git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Clarify kind of conflict in merge-one-file helper

From
Alex Riesen <raa.lkml@gmail.com>
Date
Apr 29, 2009, 21:40 UTC
Message-ID
<20090429214050.GA13794@blimp.localdomain>
Not as verbose as the recursive merge driver, but better still.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 git-merge-one-file.sh |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh
index e1eb963..9c2c1b7 100755
--- a/git-merge-one-file.sh
+++ b/git-merge-one-file.sh
@@ -113,6 +113,10 @@ case "${1:-.}${2:-.}${3:-.}" in
 	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.
@@ -120,7 +124,10 @@ case "${1:-.}${2:-.}${3:-.}" in
 	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
@@ -128,7 +135,7 @@ case "${1:-.}${2:-.}${3:-.}" in
 	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"
-- 
1.6.3.rc3.39.g49fd5
Message 1 of 1 in “Clarify kind of conflict in merge-one-file helper”
  1. Clarify kind of conflict in merge-one-file helperAlex Riesen, Apr 29, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.