summaryrefslogtreecommitdiff
path: root/git-merge-ours.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-03 15:45:36 -0800
committerJunio C Hamano <junkio@cox.net>2005-11-03 15:45:36 -0800
commit6ddc0964034342519a87fe013781abf31c6db6ad (patch)
tree74cc863556a42d41e2bf8dec45e6fd33ed312228 /git-merge-ours.sh
parent235d521da60e4699e5bd59ac658b5b48bd76ddca (diff)
parent2be8fd085e865097fa0908fe1a94c8edf9cde7f5 (diff)
GIT 0.99.9cv0.99.9c
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-merge-ours.sh')
-rwxr-xr-xgit-merge-ours.sh14
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..4f3d053889
--- /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.
+
+test "$(git-diff-index --cached --name-status HEAD)" = "" || exit 2
+
+exit 0