From ea8c3bd6426448ec54d39b761b3e1a93138d9d20 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 30 Sep 2012 23:16:03 -0400 Subject: [PATCH] Explain a design choice. --- irkerhook.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.26.2