diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-10 00:15:03 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-10 00:24:51 -0800 |
commit | 4bd5b7dacc404e6b733d9ab6744429c5027bb5e1 (patch) | |
tree | ffdf76686afbd17249255cce00e1ede134212821 /unpack-trees.c | |
parent | d048a96ee9bec968be0bdc9c43ffce61169545be (diff) | |
download | git-4bd5b7dacc404e6b733d9ab6744429c5027bb5e1.tar.gz |
ce_match_stat, run_diff_files: use symbolic constants for readability
ce_match_stat() can be told:
(1) to ignore CE_VALID bit (used under "assume unchanged" mode)
and perform the stat comparison anyway;
(2) not to perform the contents comparison for racily clean
entries and report mismatch of cached stat information;
using its "option" parameter. Give them symbolic constants.
Similarly, run_diff_files() can be told not to report anything
on removed paths. Also give it a symbolic constant for that.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unpack-trees.c')
-rw-r--r-- | unpack-trees.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index ccfeb6e245..9411c67a06 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -406,7 +406,7 @@ static void verify_uptodate(struct cache_entry *ce, return; if (!lstat(ce->name, &st)) { - unsigned changed = ce_match_stat(ce, &st, 1); + unsigned changed = ce_match_stat(ce, &st, CE_MATCH_IGNORE_VALID); if (!changed) return; /* @@ -927,7 +927,7 @@ int oneway_merge(struct cache_entry **src, if (o->reset) { struct stat st; if (lstat(old->name, &st) || - ce_match_stat(old, &st, 1)) + ce_match_stat(old, &st, CE_MATCH_IGNORE_VALID)) old->ce_flags |= htons(CE_UPDATE); } return keep_entry(old, o); |