From e271ad61336f7cf3fde21a0e728ef0a8fc3c9e8f Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Tue, 5 Jan 2010 01:39:48 -0800 Subject: 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. --- rbtools/postreview.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3