X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diff-lib.c;h=0aba6cda3c01e17b07bb7235b0395ba50256aedd;hb=75f492ace708afb4603b922a99ced318d980b8d5;hp=79d06068344f5a602f6c8799f6671ccbf98cf49c;hpb=197cf8d59c0109f486ed6b56512b3c54ea44dccd;p=git.git diff --git a/diff-lib.c b/diff-lib.c index 79d060683..0aba6cda3 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -31,7 +31,7 @@ static int check_removed(const struct cache_entry *ce, struct stat *st) 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]; @@ -214,7 +214,7 @@ static int get_stat_data(struct cache_entry *ce, 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);