From: Linus Torvalds Date: Thu, 14 Jul 2005 16:29:35 +0000 (-0700) Subject: Make "git diff" use git-sh-setup-script too.. X-Git-Tag: v0.99.1~24 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d1918a728574a627e2a9e0dfc087cfd58e9d8acd;p=git.git 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. --- diff --git a/git-diff-script b/git-diff-script index 020816bbf..03ed555e7 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 "$@"))