From: Pierre Habouzit Date: Mon, 12 Jan 2009 23:09:36 +0000 (+0100) Subject: Avoid spurious error messages on error mistakes. X-Git-Tag: v1.6.1.1~10^2~12 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=12dd1112886f18730ee471420619e77783cd5943;p=git.git Avoid spurious error messages on error mistakes. 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 Signed-off-by: Junio C Hamano --- diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 124cb5846..59c148ff6 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -309,7 +309,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