Revision 948dd346fd6748f8c2c0ae488759cbbd05a09320 authored by Junio C Hamano on 31 March 2008, 00:29:48 UTC, committed by Junio C Hamano on 31 March 2008, 05:22:09 UTC
Earlier, if you changed a staged path into a directory in the work tree, we happily ran lstat(2) on it and found that it exists, and declared that the user changed it to a gitlink. This is wrong for two reasons: (1) It may be a directory, but it may not be a submodule, and in the latter case, the change we need to report is "the blob at the path has disappeared". We need to check with resolve_gitlink_ref() to be consistent with what "git add" and "git update-index --add" does. (2) lstat(2) may have succeeded only because a leading component of the path was turned into a symbolic link that points at something that exists in the work tree. In such a case, the path itself does not exist anymore, as far as the index is concerned. This fixes these breakages in diff-index that the previous patch has exposed. Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 6301f30
File | Mode | Size |
---|---|---|
fopen.c | -rw-r--r-- | 401 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 |
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 |
setenv.c | -rw-r--r-- | 786 bytes |
snprintf.c | -rw-r--r-- | 644 bytes |
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 |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...