Skip to content

Commit 7d79c86

Browse files
author
Junio C Hamano
committed
git-merge: fail correctly when we cannot fast forward.
When we cannot fast forward the working tree and the current branch, git-merge did not exit with non-zero status. Noticed by Larry Streepy, the section to be fixed identfied by Johannes Schindelin. Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 64edf4b commit 7d79c86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-merge.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ f,*)
294294
git-update-index --refresh 2>/dev/null
295295
new_head=$(git-rev-parse --verify "$1^0") &&
296296
git-read-tree -v -m -u --exclude-per-directory=.gitignore $head "$new_head" &&
297-
finish "$new_head" "Fast forward"
297+
finish "$new_head" "Fast forward" || exit
298298
dropsave
299299
exit 0
300300
;;

0 commit comments

Comments
 (0)