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>
Junio C Hamano committed
Mar 3, 2007 at 13:04 UTC
7d79c860a6e2a8ceee10039153b47f0a8580607d
1 file changed
+1
-1
git-merge.sh
+1
-1
@@ -294,7 +294,7 @@ f,*)
294
git-update-index --refresh 2>/dev/null
295
new_head=$(git-rev-parse --verify "$1^0") &&
296
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
298
dropsave
299
exit 0
300
;;