From: Fredrik Kuivinen <freku045@student.liu.se>
To: junkio@cox.net
Cc: git@vger.kernel.org
Subject: [PATCH] More descriptive messages for conflict cases in merges
Date: Sun, 25 Sep 2005 16:49:02 +0200 [thread overview]
Message-ID: <20050925144902.GC20527@c165.ib.student.liu.se> (raw)
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>
---
git-merge.sh | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
c5a902b12ca631d0ca28f914c1b227481d300295
diff --git a/git-merge.sh b/git-merge.sh
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -71,6 +71,7 @@ test "$#" -le 2 && usage ;# we need at l
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
reply other threads:[~2005-09-25 14:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050925144902.GC20527@c165.ib.student.liu.se \
--to=freku045@student.liu.se \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox