[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    [PATCH] Avoid spurious error messages on error mistakes.
From:       Pierre Habouzit <madcoder () debian ! org>
Date:       2009-01-12 23:09:36
Message-ID: 1231801776-20724-1-git-send-email-madcoder () debian ! org
[Download RAW message or body]

Prior to that, if the user chose "squash" as a first action, the stderr
looked like:

    grep: /home/madcoder/dev/scm/git/.git/rebase-merge/done: No such file or directory
    Cannot 'squash' without a previous commit

Now the first line is gone.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---
 git-rebase--interactive.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index c8b0861..8ed2244 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -349,7 +349,7 @@ do_next () {
 	squash|s)
 		comment_for_reflog squash
 
-		has_action "$DONE" ||
+		test -f "$DONE" && has_action "$DONE" ||
 			die "Cannot 'squash' without a previous commit"
 
 		mark_action_done
-- 
1.6.1.161.g5e07b.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic