From: Eric S. Raymond Date: Mon, 1 Oct 2012 03:16:03 +0000 (-0400) Subject: Explain a design choice. X-Git-Tag: 1.3~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ea8c3bd6426448ec54d39b761b3e1a93138d9d20;p=irker.git Explain a design choice. --- diff --git a/irkerhook.py b/irkerhook.py index 77ca7bd..62c13d5 100755 --- a/irkerhook.py +++ b/irkerhook.py @@ -199,8 +199,11 @@ class GitExtractor(GenericExtractor): # Extract the meta-information for the commit self.files = do("git diff-tree -r --name-only " + shellquote(self.commit)) self.files = " ".join(self.files.strip().split("\n")[1:]) - metainfo = do("git log -1 '--pretty=format:%an <%ae>%n%s' " + shellquote(self.commit)) - (self.author, self.logmsg) = metainfo.split("\n") + # Design choice: for git we ship only the first line, which is + # conventionally supposed to be a summary of the commit. Under + # other VCSes a different choice may be appropriate. + metainfo = do("git log -1 '--pretty=format:%an <%ae>|%s' " + shellquote(self.commit)) + (self.author, self.logmsg) = metainfo.split("|") # 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