From: Nguyễn Thái Ngọc Duy Date: Thu, 28 Aug 2008 13:02:12 +0000 (+0700) Subject: diff*: fix worktree setup X-Git-Tag: v1.6.0.2~22^2~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/4f38f6b5bafb1f7f85c7b54d0bb0a0e977cd947c?ds=inline;hp=4f38f6b5bafb1f7f85c7b54d0bb0a0e977cd947c diff*: fix worktree setup This fixes "git diff", "git diff-files" and "git diff-index" to work correctly under worktree setup. Because diff* family works in many modes and not all of them require worktree, Junio made a nice summary (with a little modification from me): * diff-files is about comparing with work tree, so it obviously needs a work tree; * diff-index also does, except "diff-index --cached" or "diff --cached TREE" * no-index is about random files outside git context, so it obviously doesn't need any work tree; * comparing two (or more) trees doesn't; * comparing two blobs doesn't; * comparing a blob with a random file doesn't; Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano ---