From d74e4054e79205d6ab855fcdb19c15749ad26929 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Mon, 9 Jan 2012 15:57:38 -0800 Subject: [PATCH] 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 --- git-review | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-review b/git-review index b37fdc7..ce8fe2c 100755 --- a/git-review +++ b/git-review @@ -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)