Revision 4f38f6b5bafb1f7f85c7b54d0bb0a0e977cd947c authored by Nguyễn Thái Ngọc Duy on 28 August 2008, 13:02:12 UTC, committed by Junio C Hamano on 29 August 2008, 03:50:10 UTC
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 <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent c67b1fa
History
File Mode Size
fnmatch.c -rw-r--r-- 12.6 KB
fnmatch.h -rw-r--r-- 2.9 KB
fopen.c -rw-r--r-- 931 bytes
hstrerror.c -rw-r--r-- 513 bytes
inet_ntop.c -rw-r--r-- 4.9 KB
inet_pton.c -rw-r--r-- 6.9 KB
memmem.c -rw-r--r-- 668 bytes
mingw.c -rw-r--r-- 23.4 KB
mingw.h -rw-r--r-- 5.8 KB
mkdtemp.c -rw-r--r-- 152 bytes
mmap.c -rw-r--r-- 747 bytes
pread.c -rw-r--r-- 433 bytes
qsort.c -rw-r--r-- 1.1 KB
regex.c -rw-r--r-- 139.4 KB
regex.h -rw-r--r-- 18.0 KB
setenv.c -rw-r--r-- 786 bytes
snprintf.c -rw-r--r-- 1.1 KB
strcasestr.c -rw-r--r-- 431 bytes
strlcpy.c -rw-r--r-- 247 bytes
strtoumax.c -rw-r--r-- 217 bytes
unsetenv.c -rw-r--r-- 558 bytes
winansi.c -rw-r--r-- 6.6 KB

back to top