Skip to content
Snippets Groups Projects
Commit 480301f6 authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

Author name truncation is git-specific.

parent 470d3ca2
No related branches found
No related tags found
No related merge requests found
......@@ -127,6 +127,11 @@ class GitExtractor:
self.files = do("git diff-tree -r --name-only '"+ merged +"' | sed -e '1d' -e 's-.*-&-'")
metainfo = do("git log -1 '--pretty=format:%an <%ae>%n%s' " + merged)
(self.author, self.logmsg) = metainfo.split("\n")
# This discards the part of the author's address after @.
# Might be be nice to ship the full email address, if not
# for spammers' address harvesters - getting this wrong
# would make the freenode #commits channel into harvester heaven.
self.author = self.author.replace("<", "").split("@")[0].split()[-1]
if __name__ == "__main__":
import getopt
......@@ -169,11 +174,6 @@ if __name__ == "__main__":
for merged in merges:
extractor.extract(refname, merged)
# This discards the part of the author's address after @.
# Might be be nice to ship the full email address, if not
# for spammers' address harvesters - getting this wrong
# would make the freenode #commits channel into harvester heaven.
extractor.author = extractor.author.replace("<", "").split("@")[0].split()[-1]
privmsg = template % extractor.__dict__
channel_list = extractor.channels.split(",")
structure = {"to":channel_list, "privmsg":privmsg}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment