aboutsummaryrefslogtreecommitdiff
path: root/t/t2201-add-update-typechange.sh
Commit message (Collapse)AuthorAge
* t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diffBrandon Casey2008-07-23
| | | | | Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* diff-files: careful when inspecting work tree itemsJunio C Hamano2008-03-30
| | | | | | This fixes the same breakage in diff-files. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* diff-index: careful when inspecting work tree itemsJunio C Hamano2008-03-30
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Add corner case tests for diff-index and diff-filesJunio C Hamano2008-03-30
diff-index and diff-files can get confused in corner cases when an indexed blob turns into something else in the work tree. This patch adds tests to expose such breakages. The test is classified under t2XXX series instead of t4XXX series, because the ultimate objective is to fix "add -u" (and "commit -a" that shares the same issue). Signed-off-by: Junio C Hamano <gitster@pobox.com>