summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-14 16:29:35 (GMT)
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-14 16:29:35 (GMT)
commitd1918a728574a627e2a9e0dfc087cfd58e9d8acd (patch)
tree33a537505aa0d401aa0394611c9e9e518e60f189
parentb0966e1010547095ea6fe546dcbbe23a03b62841 (diff)
downloadgit-d1918a728574a627e2a9e0dfc087cfd58e9d8acd.zip
git-d1918a728574a627e2a9e0dfc087cfd58e9d8acd.tar.gz
git-d1918a728574a627e2a9e0dfc087cfd58e9d8acd.tar.bz2
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.
-rwxr-xr-xgit-diff-script2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-diff-script b/git-diff-script
index 020816b..03ed555 100755
--- a/git-diff-script
+++ b/git-diff-script
@@ -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 "$@"))