[PATCH] allow merging any committish
Although "git-merge" is advertised as the end-user level command (instead of being a "git-pull" backend), it was not prepared to take tag objects that point at commits and barfed when fed one. Sanitize the input while we validate them, for which we already have a loop. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
0a8b4def9a
commit
9954f5b876
@ -97,11 +97,14 @@ head=$(git-rev-parse --verify "$1"^0) || usage
|
|||||||
shift
|
shift
|
||||||
|
|
||||||
# All the rest are remote heads
|
# All the rest are remote heads
|
||||||
|
remoteheads=
|
||||||
for remote
|
for remote
|
||||||
do
|
do
|
||||||
git-rev-parse --verify "$remote"^0 >/dev/null ||
|
remotehead=$(git-rev-parse --verify "$remote"^0) ||
|
||||||
die "$remote - not something we can merge"
|
die "$remote - not something we can merge"
|
||||||
|
remoteheads="${remoteheads}$remotehead "
|
||||||
done
|
done
|
||||||
|
set x $remoteheads ; shift
|
||||||
|
|
||||||
case "$#" in
|
case "$#" in
|
||||||
1)
|
1)
|
||||||
|
Loading…
Reference in New Issue
Block a user