From 5e5d17f226acbde9a45a12b306de62c49b28fff7 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 8 Oct 2013 12:14:48 -0400 Subject: [PATCH] Ignore content of merge commits in reporting When we report changes that are going to be submitted, the results of merging a giant branch into the current one is TERRIFYING, as it shows every commit in the branch. Exclude all changes that are already on branches in the remote so that only the merge commit and its first parent are shown, which should make the output less crazy-inducing. Change-Id: I461f3eb23642deaf2caded631291414ae6997a91 --- git_review/cmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git_review/cmd.py b/git_review/cmd.py index bbe8bbf..140f6f8 100755 --- a/git_review/cmd.py +++ b/git_review/cmd.py @@ -539,8 +539,8 @@ def assert_one_change(remote, branch, yes, have_hook): use_color = "--color=%s" % color else: use_color = "" - cmd = "git log %s --decorate --oneline HEAD --not remotes/%s/%s --" % ( - use_color, remote, branch) + cmd = ("git log %s --decorate --oneline HEAD --not --remotes=%s" % ( + use_color, remote)) (status, output) = run_command_status(cmd) if status != 0: print("Had trouble running %s" % cmd)