{"thread":{"id":"1940","subject":"[PATCH] More descriptive messages for conflict cases in merges","startedAt":"2005-09-25T14:49:02Z","lastAt":"2005-09-25T14:49:02Z","messageCount":1,"participants":["Fredrik Kuivinen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"9257","messageId":"20050925144902.GC20527@c165.ib.student.liu.se","threadId":"1940","inReplyTo":null,"subject":"[PATCH] More descriptive messages for conflict cases in merges","fromName":"Fredrik Kuivinen","fromEmail":"freku045@student.liu.se","sentAt":"2005-09-25T14:49:02Z","receivedAt":"2005-09-25T14:49:02Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"The merge strategies can give more descriptive error messages for\nconflict cases if they are given the actual branch names instead of\nthe SHA1s.\n\nSigned-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n\n---\n\n git-merge.sh |    7 ++++---\n 1 files changed, 4 insertions(+), 3 deletions(-)\n\nc5a902b12ca631d0ca28f914c1b227481d300295\ndiff --git a/git-merge.sh b/git-merge.sh\n--- a/git-merge.sh\n+++ b/git-merge.sh\n@@ -71,6 +71,7 @@ test \"$#\" -le 2 && usage ;# we need at l\n \n merge_msg=\"$1\"\n shift\n+head_arg=\"$1\"\n head=$(git-rev-parse --verify \"$1\"^0) || usage\n shift\n \n@@ -86,7 +87,7 @@ echo \"$head\" >\"$GIT_DIR/ORIG_HEAD\"\n \n case \"$#,$common\" in\n *,'')\n-\tdie \"Unable to find common commit between $head and $*\"\n+\tdie \"Unable to find common commit between $head_arg and $*\"\n \t;;\n 1,\"$1\")\n \t# If head can reach all the merge then we are up to date.\n@@ -147,7 +148,7 @@ do\n     }\n     echo \"Trying merge strategy $strategy...\"\n     wt_strategy=$strategy\n-    git-merge-$strategy $common -- $head \"$@\" || {\n+    git-merge-$strategy $common -- $head_arg \"$@\" || {\n \n \t# The backend exits with 1 when conflicts are left to be resolved,\n \t# with 2 when it does not handle the given merge at all.\n@@ -202,7 +203,7 @@ case \"$best_strategy\" in\n \techo \"Rewinding the tree to pristine...\"\n \tgit reset --hard $head\n \techo \"Using the $best_strategy to prepare resolving by hand.\"\n-\tgit-merge-$best_strategy $common -- $head \"$@\"\n+\tgit-merge-$best_strategy $common -- $head_arg \"$@\"\n \t;;\n esac\n for remote\n"}]}