diff options
Diffstat (limited to 'git-merge-ours.sh')
-rwxr-xr-x | git-merge-ours.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/git-merge-ours.sh b/git-merge-ours.sh new file mode 100755 index 0000000000..2b6a5c0d10 --- /dev/null +++ b/git-merge-ours.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Copyright (c) 2005 Junio C Hamano +# +# Pretend we resolved the heads, but declare our tree trumps everybody else. +# + +# We need to exit with 2 if the index does not match our HEAD tree, +# because the current index is what we will be committing as the +# merge result. + +git-diff-index --quiet --cached HEAD || exit 2 + +exit 0 |