aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Kuivinen <freku045@student.liu.se>2005-09-25 16:49:02 +0200
committerJunio C Hamano <junkio@cox.net>2005-09-25 16:08:54 -0700
commit8cc01e5019e0dc9a86bba4cba414b46627fe0424 (patch)
tree39fe301791ff723b32fdfcb87d49c7ee1e10c6ca
parent0bed18998ae6c0cec1485e6295be16a4fcebc7a7 (diff)
downloadgit-8cc01e5019e0dc9a86bba4cba414b46627fe0424.tar.gz
git-8cc01e5019e0dc9a86bba4cba414b46627fe0424.tar.xz
[PATCH] More descriptive messages for conflict cases in merges
The merge strategies can give more descriptive error messages for conflict cases if they are given the actual branch names instead of the SHA1s. Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgit-merge.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/git-merge.sh b/git-merge.sh
index 818e6b772..41bc6d956 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -71,6 +71,7 @@ test "$#" -le 2 && usage ;# we need at least two heads.
merge_msg="$1"
shift
+head_arg="$1"
head=$(git-rev-parse --verify "$1"^0) || usage
shift
@@ -86,7 +87,7 @@ echo "$head" >"$GIT_DIR/ORIG_HEAD"
case "$#,$common" in
*,'')
- die "Unable to find common commit between $head and $*"
+ die "Unable to find common commit between $head_arg and $*"
;;
1,"$1")
# If head can reach all the merge then we are up to date.
@@ -147,7 +148,7 @@ do
}
echo "Trying merge strategy $strategy..."
wt_strategy=$strategy
- git-merge-$strategy $common -- $head "$@" || {
+ git-merge-$strategy $common -- $head_arg "$@" || {
# The backend exits with 1 when conflicts are left to be resolved,
# with 2 when it does not handle the given merge at all.
@@ -202,7 +203,7 @@ case "$best_strategy" in
echo "Rewinding the tree to pristine..."
git reset --hard $head
echo "Using the $best_strategy to prepare resolving by hand."
- git-merge-$best_strategy $common -- $head "$@"
+ git-merge-$best_strategy $common -- $head_arg "$@"
;;
esac
for remote