summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ac9f71c)
raw | patch | inline | side by side (parent: ac9f71c)
author | Alex Riesen <raa.lkml@gmail.com> | |
Wed, 29 Apr 2009 21:40:50 +0000 (23:40 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 9 May 2009 07:27:39 +0000 (00:27 -0700) |
Not as verbose as the recursive merge driver, but better still.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-merge-one-file.sh | patch | blob | history |
diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh
index e1eb9632660146396a0b5f3f2a410d8cb027ff9d..9c2c1b7202462370509a7bdb391982ae32564bd6 100755 (executable)
--- a/git-merge-one-file.sh
+++ b/git-merge-one-file.sh
src1=`git-unpack-file $2`
git merge-file "$src1" "$orig" "$src2"
ret=$?
+ msg=
+ if [ $ret -ne 0 ]; then
+ msg='content conflict'
+ fi
# Create the working tree file, using "our tree" version from the
# index, and then store the result of the merge.
rm -f -- "$orig" "$src1" "$src2"
if [ "$6" != "$7" ]; then
- echo "ERROR: Permissions conflict: $5->$6,$7."
+ if [ -n "$msg" ]; then
+ msg="$msg, "
+ fi
+ msg="${msg}permissions conflict: $5->$6,$7"
ret=1
fi
if [ "$1" = '' ]; then
fi
if [ $ret -ne 0 ]; then
- echo "ERROR: Merge conflict in $4"
+ echo "ERROR: $msg in $4"
exit 1
fi
exec git update-index -- "$4"