summaryrefslogtreecommitdiff
path: root/git-add.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-28 07:33:54 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-29 07:13:03 (GMT)
commitd165fa14f0a111dfc85d964ecc037d0b280cd54f (patch)
tree4e7244f27b394bc4f2fd84a677bda73e1231276c /git-add.sh
parentd6ea70af7708af5f29db09b2d782ab3b9ce50f79 (diff)
downloadgit-d165fa14f0a111dfc85d964ecc037d0b280cd54f.zip
git-d165fa14f0a111dfc85d964ecc037d0b280cd54f.tar.gz
git-d165fa14f0a111dfc85d964ecc037d0b280cd54f.tar.bz2
define die() for scripts that use it.
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>
Diffstat (limited to 'git-add.sh')
-rwxr-xr-xgit-add.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-add.sh b/git-add.sh
index b5fe46a..fdec86d 100755
--- a/git-add.sh
+++ b/git-add.sh
@@ -1,5 +1,10 @@
#!/bin/sh
+die () {
+ echo >&2 "$*"
+ exit 1
+}
+
usage() {
die "usage: git add [-n] [-v] <file>..."
}