summaryrefslogtreecommitdiff
path: root/git-merge.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-11-26 22:16:31 -0800
committerJunio C Hamano <junkio@cox.net>2006-11-26 22:16:31 -0800
commit51901e96bf592877f7b266d0d9c6cb83b363edce (patch)
treec10a65d4e93bbb26882a9a22b5a25404100cbc47 /git-merge.sh
parent8092c7f6af044836abf83ed26d542327a4b95c08 (diff)
downloadgit-51901e96bf592877f7b266d0d9c6cb83b363edce.tar.gz
git-merge: tighten error checking.
If a branch name to be merged is misspelled, the command leaked error messages from underlying plumbing commands, which were helpful only to people who know how the command are implemented to diagnose the breakage, but simply puzzling and unhelpful for the end users. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-merge.sh')
-rwxr-xr-xgit-merge.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-merge.sh b/git-merge.sh
index dd4e83dede..5fa8b0d577 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -188,13 +188,13 @@ else
# in this loop.
merge_name=$(for remote
do
- rh=$(git-rev-parse --verify "$remote"^0 2>/dev/null)
+ rh=$(git-rev-parse --verify "$remote"^0 2>/dev/null) &&
if git show-ref -q --verify "refs/heads/$remote"
then
what=branch
else
what=commit
- fi
+ fi &&
echo "$rh $what '$remote'"
done | git-fmt-merge-msg
)
@@ -209,7 +209,7 @@ test "$rloga" = '' && rloga="merge: $@"
remoteheads=
for remote
do
- remotehead=$(git-rev-parse --verify "$remote"^0) ||
+ remotehead=$(git-rev-parse --verify "$remote"^0 2>/dev/null) ||
die "$remote - not something we can merge"
remoteheads="${remoteheads}$remotehead "
done