Make "git diff" use git-sh-setup-script too..

Give a sane error rather than just silently claiming no diffs when
you're not at the top-level directory.
This commit is contained in:
Linus Torvalds 2005-07-14 09:29:35 -07:00
parent b0966e1010
commit d1918a7285

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
. git-sh-setup-script || die "Not a git archive"
rev=($(git-rev-parse --revs-only "$@")) rev=($(git-rev-parse --revs-only "$@"))
flags=($(git-rev-parse --no-revs --flags "$@")) flags=($(git-rev-parse --no-revs --flags "$@"))
files=($(git-rev-parse --no-revs --no-flags "$@")) files=($(git-rev-parse --no-revs --no-flags "$@"))