summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8092c7f)
raw | patch | inline | side by side (parent: 8092c7f)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 27 Nov 2006 06:16:31 +0000 (22:16 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 27 Nov 2006 06:16:31 +0000 (22:16 -0800) |
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>
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>
git-merge.sh | patch | blob | history |
diff --git a/git-merge.sh b/git-merge.sh
index dd4e83dede72ee4b4c85632aa582ef8a25d00447..5fa8b0d577879e00c1959098250a9b1fd559fdc8 100755 (executable)
--- a/git-merge.sh
+++ b/git-merge.sh
# 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
)
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