summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hammond <chipx86@chipx86.com>2010-01-05 01:39:48 -0800
committerChristian Hammond <chipx86@chipx86.com>2010-01-05 01:41:38 -0800
commite271ad61336f7cf3fde21a0e728ef0a8fc3c9e8f (patch)
tree62cb8fe3584dd24c0678dc2fbd5cc542b2c4649c
parent9d1648a4305cd16187a1693da9da2173692d1ed9 (diff)
Fix --guess-description with Git.
A recent change to post-review broke --guess-description with Git when not specifically using a parent branch. We now default to grabbing all logs from the merge base (for example, "master") and using that as the description. This covers the same range as the diff itself.
-rwxr-xr-xrbtools/postreview.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rbtools/postreview.py b/rbtools/postreview.py
index 2cc36ba..4c38333 100755
--- a/rbtools/postreview.py
+++ b/rbtools/postreview.py
@@ -2111,7 +2111,8 @@ class GitClient(SCMClient):
if options.guess_description and not options.description:
options.description = execute(
- ["git", "log", "--pretty=format:%s%n%n%b", parent_branch + ".."],
+ ["git", "log", "--pretty=format:%s%n%n%b",
+ (parent_branch or self.merge_base) + ".."],
ignore_errors=True).strip()
return (diff_lines, parent_diff_lines)