summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d6ea70a)
raw | patch | inline | side by side (parent: d6ea70a)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 28 Nov 2005 07:33:54 +0000 (23:33 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 29 Nov 2005 07:13:03 +0000 (23:13 -0800) |
As a fallout from not using git-sh-setup in scripts that can
operate from a subdirectory, we lost definition of die() from
them. It might make sense to do some cleanup to consolidate
them back again, but this should suffice for now.
Signed-off-by: Junio C Hamano <junkio@cox.net>
operate from a subdirectory, we lost definition of die() from
them. It might make sense to do some cleanup to consolidate
them back again, but this should suffice for now.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-add.sh | patch | blob | history | |
git-branch.sh | patch | blob | history | |
git-diff.sh | patch | blob | history | |
git-merge-octopus.sh | patch | blob | history | |
git-tag.sh | patch | blob | history | |
git-verify-tag.sh | patch | blob | history |
diff --git a/git-add.sh b/git-add.sh
index b5fe46aa20865d6785390fd22406d32b00a77845..fdec86d1a41af847f9d737a2c058e2d2027f32fe 100755 (executable)
--- a/git-add.sh
+++ b/git-add.sh
#!/bin/sh
+die () {
+ echo >&2 "$*"
+ exit 1
+}
+
usage() {
die "usage: git add [-n] [-v] <file>..."
}
diff --git a/git-branch.sh b/git-branch.sh
index b48c32988fc16fe9d221cca18c1030bbaaa5838b..5306b2719ffbedfa077f4d5489ab46448ef5c186 100755 (executable)
--- a/git-branch.sh
+++ b/git-branch.sh
GIT_DIR=`git-rev-parse --git-dir` || exit $?
+die () {
+ echo >&2 "$*"
+ exit 1
+}
+
usage () {
echo >&2 "usage: $(basename $0)"' [-d <branch>] | [[-f] <branch> [start-point]]
diff --git a/git-diff.sh b/git-diff.sh
index b3ec84be698311b30e8c7c793873e6caa41daf71..e45f50ec224d2b0ee23780a00dd351746665a9a2 100755 (executable)
--- a/git-diff.sh
+++ b/git-diff.sh
: ${flags:="'-M' '-p'"}
+die () {
+ echo >&2 "$*"
+ exit 1
+}
+
# I often say 'git diff --cached -p' and get scolded by git-diff-files, but
# obviously I mean 'git diff --cached -p HEAD' in that case.
case "$rev" in
diff --git a/git-merge-octopus.sh b/git-merge-octopus.sh
index bb58e22a18bdaefae3f8005e7b0a0cfaba4b4185..7adffdc7950baaf1da5b36913f78404c48c6d270 100755 (executable)
--- a/git-merge-octopus.sh
+++ b/git-merge-octopus.sh
LF='
'
+die () {
+ echo >&2 "$*"
+ exit 1
+}
+
# The first parameters up to -- are merge bases; the rest are heads.
bases= head= remotes= sep_seen=
for arg
diff --git a/git-tag.sh b/git-tag.sh
index e71028695c935c6c757ac168f1c9a1670076b29d..2435a75f7a9414bdceb1cef308a99918784f5421 100755 (executable)
--- a/git-tag.sh
+++ b/git-tag.sh
exit 1
}
+die () {
+ echo >&2 "$*"
+ exit 1
+}
+
annotate=
signed=
force=
diff --git a/git-verify-tag.sh b/git-verify-tag.sh
index d6e0eb87c3df97c978b2de37841fb5fba375a067..1f44da53496e880395286dafb431b9c3095df9f1 100755 (executable)
--- a/git-verify-tag.sh
+++ b/git-verify-tag.sh
GIT_DIR=`git-rev-parse --git-dir` || exit $?
+die () {
+ echo >&2 "$*"
+ exit 1
+}
+
type="$(git-cat-file -t "$1" 2>/dev/null)" ||
die "$1: no such object."