git-resolve: dying is good, not showing help is bad.
Recent change to make sure we get commit, not tag, accidentally removed its feature of giving a usage help message when it died. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
b779dd5ee3
commit
165e160e4c
@ -6,21 +6,25 @@
|
|||||||
#
|
#
|
||||||
. git-sh-setup-script || die "Not a git archive"
|
. git-sh-setup-script || die "Not a git archive"
|
||||||
|
|
||||||
head=$(git-rev-parse --verify "$1"^0) || exit
|
usage () {
|
||||||
merge=$(git-rev-parse --verify "$2"^0) || exit
|
die "git-resolve-script <head> <remote> <merge-message>"
|
||||||
merge_msg="$3"
|
}
|
||||||
|
|
||||||
dropheads() {
|
dropheads() {
|
||||||
rm -f -- "$GIT_DIR/MERGE_HEAD" \
|
rm -f -- "$GIT_DIR/MERGE_HEAD" \
|
||||||
"$GIT_DIR/LAST_MERGE" || exit 1
|
"$GIT_DIR/LAST_MERGE" || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
head=$(git-rev-parse --verify "$1"^0) &&
|
||||||
|
merge=$(git-rev-parse --verify "$2"^0) &&
|
||||||
|
merge_msg="$3" || usage
|
||||||
|
|
||||||
#
|
#
|
||||||
# The remote name is just used for the message,
|
# The remote name is just used for the message,
|
||||||
# but we do want it.
|
# but we do want it.
|
||||||
#
|
#
|
||||||
if [ -z "$head" -o -z "$merge" -o -z "$merge_msg" ]; then
|
if [ -z "$head" -o -z "$merge" -o -z "$merge_msg" ]; then
|
||||||
die "git-resolve-script <head> <remote> <merge-message>"
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dropheads
|
dropheads
|
||||||
|
Loading…
Reference in New Issue
Block a user