Clarify kind of conflict in merge-one-file helper
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>maint
parent
ac9f71cf76
commit
718135e3b6
|
@ -113,6 +113,10 @@ case "${1:-.}${2:-.}${3:-.}" in
|
||||||
src1=`git-unpack-file $2`
|
src1=`git-unpack-file $2`
|
||||||
git merge-file "$src1" "$orig" "$src2"
|
git merge-file "$src1" "$orig" "$src2"
|
||||||
ret=$?
|
ret=$?
|
||||||
|
msg=
|
||||||
|
if [ $ret -ne 0 ]; then
|
||||||
|
msg='content conflict'
|
||||||
|
fi
|
||||||
|
|
||||||
# Create the working tree file, using "our tree" version from the
|
# Create the working tree file, using "our tree" version from the
|
||||||
# index, and then store the result of the merge.
|
# index, and then store the result of the merge.
|
||||||
|
@ -120,7 +124,10 @@ case "${1:-.}${2:-.}${3:-.}" in
|
||||||
rm -f -- "$orig" "$src1" "$src2"
|
rm -f -- "$orig" "$src1" "$src2"
|
||||||
|
|
||||||
if [ "$6" != "$7" ]; then
|
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
|
ret=1
|
||||||
fi
|
fi
|
||||||
if [ "$1" = '' ]; then
|
if [ "$1" = '' ]; then
|
||||||
|
@ -128,7 +135,7 @@ case "${1:-.}${2:-.}${3:-.}" in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $ret -ne 0 ]; then
|
if [ $ret -ne 0 ]; then
|
||||||
echo "ERROR: Merge conflict in $4"
|
echo "ERROR: $msg in $4"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
exec git update-index -- "$4"
|
exec git update-index -- "$4"
|
||||||
|
|
Loading…
Reference in New Issue