summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2015-08-22 01:08:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-09-07 03:01:13 (GMT)
commit895ff3b2c73c737b699a921fe71cea4dadefab7b (patch)
tree5e4900163660191be5544e4c4df14f6dd8d73bf9 /read-cache.c
parenta62bc310bf033f38a23fb80f5ab2c9f6f05cd161 (diff)
downloadgit-895ff3b2c73c737b699a921fe71cea4dadefab7b.zip
git-895ff3b2c73c737b699a921fe71cea4dadefab7b.tar.gz
git-895ff3b2c73c737b699a921fe71cea4dadefab7b.tar.bz2
add and use a convenience macro ce_intent_to_add()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c
index 36ff89f..fb80c47 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -311,7 +311,7 @@ int ie_match_stat(const struct index_state *istate,
* by definition never matches what is in the work tree until it
* actually gets added.
*/
- if (ce->ce_flags & CE_INTENT_TO_ADD)
+ if (ce_intent_to_add(ce))
return DATA_CHANGED | TYPE_CHANGED | MODE_CHANGED;
changed = ce_match_stat_basic(ce, st);
@@ -1231,7 +1231,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
if (cache_errno == ENOENT)
fmt = deleted_fmt;
- else if (ce->ce_flags & CE_INTENT_TO_ADD)
+ else if (ce_intent_to_add(ce))
fmt = added_fmt; /* must be before other checks */
else if (changed & TYPE_CHANGED)
fmt = typechange_fmt;