diff options
author | Junio C Hamano <junkio@cox.net> | 2005-12-21 00:01:00 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-12-21 00:01:00 -0800 |
commit | c2f3bf071ee90b01f2d629921bb04c4f798f02fa (patch) | |
tree | 08ffe5b40e062d596deee47f3869278f4661a858 /git-diff.sh | |
parent | GIT 0.99.9n aka 1.0rc6 (diff) | |
parent | Make "git-send-pack" less verbose by default (diff) | |
download | tgif-c2f3bf071ee90b01f2d629921bb04c4f798f02fa.tar.xz |
GIT 1.0.0
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-diff.sh')
-rwxr-xr-x | git-diff.sh | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/git-diff.sh b/git-diff.sh index b62e58341c..4812ae4c1f 100755 --- a/git-diff.sh +++ b/git-diff.sh @@ -3,15 +3,14 @@ # Copyright (c) 2005 Linus Torvalds # Copyright (c) 2005 Junio C Hamano +USAGE='[ --diff-options ] <ent>{0,2} [<path>...]' +SUBDIRECTORY_OK='Yes' +. git-sh-setup + rev=$(git-rev-parse --revs-only --no-flags --sq "$@") || exit flags=$(git-rev-parse --no-revs --flags --sq "$@") files=$(git-rev-parse --no-revs --no-flags --sq "$@") -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 @@ -40,8 +39,7 @@ esac case "$rev" in ?*' '?*' '?*) - echo >&2 "I don't understand" - exit 1 + usage ;; ?*' '^?*) begin=$(expr "$rev" : '.*^.\([0-9a-f]*\).*') && @@ -58,7 +56,7 @@ case "$rev" in cmd="git-diff-files $flags -- $files" ;; *) - die "I don't understand $*" + usage ;; esac |