Skip to content

Commit 12dd111

Browse files
MadCodergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 47a845b commit 12dd111

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-rebase--interactive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ do_next () {
309309
squash|s)
310310
comment_for_reflog squash
311311

312-
has_action "$DONE" ||
312+
test -f "$DONE" && has_action "$DONE" ||
313313
die "Cannot 'squash' without a previous commit"
314314

315315
mark_action_done

0 commit comments

Comments
 (0)