]> asedeno.scripts.mit.edu Git - git.git/commitdiff
Make "git diff" use git-sh-setup-script too..
authorLinus Torvalds <torvalds@g5.osdl.org>
Thu, 14 Jul 2005 16:29:35 +0000 (09:29 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 14 Jul 2005 16:29:35 +0000 (09:29 -0700)
Give a sane error rather than just silently claiming no diffs when
you're not at the top-level directory.

git-diff-script

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