diff options
author | Junio C Hamano <junkio@cox.net> | 2005-11-27 23:33:54 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-28 23:13:03 -0800 |
commit | d165fa14f0a111dfc85d964ecc037d0b280cd54f (patch) | |
tree | 4e7244f27b394bc4f2fd84a677bda73e1231276c /git-diff.sh | |
parent | d6ea70af7708af5f29db09b2d782ab3b9ce50f79 (diff) | |
download | git-d165fa14f0a111dfc85d964ecc037d0b280cd54f.tar.gz git-d165fa14f0a111dfc85d964ecc037d0b280cd54f.tar.xz |
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-diff.sh')
-rwxr-xr-x | git-diff.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/git-diff.sh b/git-diff.sh index b3ec84be6..e45f50ec2 100755 --- a/git-diff.sh +++ b/git-diff.sh @@ -9,6 +9,11 @@ files=$(git-rev-parse --no-revs --no-flags --sq "$@") : ${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 |