summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b779dd5)
raw | patch | inline | side by side (parent: b779dd5)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 20 Aug 2005 08:21:21 +0000 (01:21 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 20 Aug 2005 08:21:21 +0000 (01:21 -0700) |
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>
removed its feature of giving a usage help message when it died.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-resolve-script | patch | blob | history |
diff --git a/git-resolve-script b/git-resolve-script
index 4641119e0f00848f5dacce40fd376efc1cbdbcb5..50d5f8336feec0eb9839a2641cb9faf9ab67391d 100755 (executable)
--- a/git-resolve-script
+++ b/git-resolve-script
#
. git-sh-setup-script || die "Not a git archive"
-head=$(git-rev-parse --verify "$1"^0) || exit
-merge=$(git-rev-parse --verify "$2"^0) || exit
-merge_msg="$3"
+usage () {
+ die "git-resolve-script <head> <remote> <merge-message>"
+}
dropheads() {
rm -f -- "$GIT_DIR/MERGE_HEAD" \
"$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,
# but we do want it.
#
if [ -z "$head" -o -z "$merge" -o -z "$merge_msg" ]; then
- die "git-resolve-script <head> <remote> <merge-message>"
+ usage
fi
dropheads