Switch from 'git show' to 'git log'.

When searching for a topic, use 'git log' instead of 'git show'.
Git show prints the diff, which may include comments that match
the topic regexes.  We should really only be looking at the commit
messages, so use 'git log' instead.

Change-Id: I188b1f324b5c584317fd61227c176987a51d087e
This commit is contained in:
James E. Blair
2012-01-09 15:57:38 -08:00
parent 405d6cc3fb
commit d74e4054e7

View File

@@ -418,7 +418,7 @@ def get_topic(target_branch):
if len(branch_parts) >= 3 and branch_parts[0] == "review":
return "/".join(branch_parts[2:])
log_output = run_command("git show --format='%s %b'")
log_output = run_command("git log HEAD^1..HEAD")
bug_re = r'\b([Bb]ug|[Ll][Pp])\s*[#:]?\s*(\d+)'
match = re.search(bug_re, log_output)