Skip to content

Commit

Permalink
git-merge: finish when git-read-tree fails
Browse files Browse the repository at this point in the history
The message formating (commit v1.5.0.3-28-gbe242d5) broke the && chain.

Noticed by Dmitry Torokhov.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Santi Béjar authored and Junio C Hamano committed Mar 16, 2007
1 parent 3d4e193 commit 2be08a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,13 @@ f,*)
# Again the most common case of merging one remote.
echo "Updating $(git-rev-parse --short $head)..$(git-rev-parse --short $1)"
git-update-index --refresh 2>/dev/null
new_head=$(git-rev-parse --verify "$1^0") &&
git-read-tree -v -m -u --exclude-per-directory=.gitignore $head "$new_head" &&
msg="Fast forward"
if test -n "$have_message"
then
msg="$msg (no commit created; -m option ignored)"
fi
new_head=$(git-rev-parse --verify "$1^0") &&
git-read-tree -v -m -u --exclude-per-directory=.gitignore $head "$new_head" &&
finish "$new_head" "$msg" || exit
dropsave
exit 0
Expand Down

0 comments on commit 2be08a8

Please sign in to comment.