Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "Send messages from the committers address, not the author. In…

…clude the author info in the message. 2nd time's a charm :-)"

This reverts commit 385738fa3f254ceeec28629383b2f52955ae83ae.
  • Loading branch information...
commit 7e6a7ee67d883d650596adbf087ba24d925fdd55 1 parent 4237a45
@dpage dpage authored
Showing with 9 additions and 22 deletions.
  1. +9 −22 commitmsg.py
View
31 commitmsg.py
@@ -107,10 +107,8 @@ def parse_commit_log(lines):
# Reset our parsing data
commitinfo = ""
- committerinfo = ""
authorinfo = ""
- commitdateinfo = ""
- authordateinfo = ""
+ dateinfo = ""
mergeinfo = ""
while True:
l = lines.pop().strip()
@@ -118,30 +116,24 @@ def parse_commit_log(lines):
break
elif l.startswith("commit "):
commitinfo = l
- elif l.startswith("Commit: "):
- committerinfo = l
- elif l.startswith("CommitDate: "):
- commitdateinfo = l
- elif l.startswith("Author: "):
+ elif l.startswith("Author: "):
authorinfo = l
- elif l.startswith("AuthorDate: "):
- authordateinfo = l
- elif l.startswith("Merge: "):
+ elif l.startswith("Date: "):
+ dateinfo = l
+ elif l.startswith("Merge: "):
mergeinfo = l
else:
raise Exception("Unknown header line: %s" % l)
- if not (commitinfo or committerinfo or authorinfo or commitdateinfo):
+ if not (commitinfo or authorinfo or dateinfo):
# If none of these existed, we must've hit the end of the log
return False
# Check for any individual piece that is missing
if not commitinfo:
raise Exception("Could not find commit hash!")
- if not committerinfo:
- raise Exception("Could not find committer!")
if not authorinfo:
raise Exception("Could not find author!")
- if not commitdateinfo:
+ if not dateinfo:
raise Exception("Could not find commit date!")
commitmsg = []
@@ -182,11 +174,6 @@ def parse_commit_log(lines):
mail.append("-----------")
mail.extend(commitmsg)
mail.append("")
- if authorinfo[7:].strip() != committerinfo[7:].strip():
- mail.append("Author")
- mail.append("------")
- mail.append(authorinfo[7:].strip())
- mail.append("")
if len(branches) > 1:
mail.append("Branches")
mail.append("--------")
@@ -202,7 +189,7 @@ def parse_commit_log(lines):
mail.append("")
msg = create_message("\n".join(mail),
- committerinfo[7:],
+ authorinfo[7:],
c.get('commitmsg','subject').replace("$shortmsg",
commitmsg[0][:80-len(c.get('commitmsg','subject'))]))
sendmail(msg)
@@ -305,7 +292,7 @@ def parse_annotated_tag(lines):
"Branch %s was removed" % ref)))
else:
# If both are real object ids, we can call git log on them
- cmd = "git log %s..%s --stat --format=fuller" % (oldobj, newobj)
+ cmd = "git log %s..%s --stat" % (oldobj, newobj)
p = Popen(cmd, shell=True, stdout=PIPE)
lines = p.stdout.readlines()
lines.reverse()
Please sign in to comment.
Something went wrong with that request. Please try again.