Skip to content

Commit

Permalink
merge script: refuse to merge during merge
Browse files Browse the repository at this point in the history
Check MERGE_HEAD and bail out if it exists.  Based on v1.6.3.3~3^2
(refuse to merge during a merge, 2009-06-01).  Without this change,
the scripted merge does not pass t3030.

Cc: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Aug 18, 2010
1 parent 64048d6 commit 6239af1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contrib/examples/git-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ cd_to_toplevel
test -z "$(git ls-files -u)" ||
die "Merge is not possible because you have unmerged files."

! test -e "$GIT_DIR/MERGE_HEAD" ||
die 'You have not concluded your merge (MERGE_HEAD exists).'

LF='
'

Expand Down

0 comments on commit 6239af1

Please sign in to comment.