diff --git a/diff-lib.c b/diff-lib.c
index 79d06068344f5a602f6c8799f6671ccbf98cf49c..0aba6cda3c01e17b07bb7235b0395ba50256aedd 100644 (file)
--- a/diff-lib.c
+++ b/diff-lib.c
return -1;
return 1;
}
- if (has_symlink_leading_path(ce_namelen(ce), ce->name))
+ if (has_symlink_leading_path(ce->name, ce_namelen(ce)))
return 1;
if (S_ISDIR(st->st_mode)) {
unsigned char sub[20];
const unsigned char *sha1 = ce->sha1;
unsigned int mode = ce->ce_mode;
- if (!cached) {
+ if (!cached && !ce_uptodate(ce)) {
int changed;
struct stat st;
changed = check_removed(ce, &st);