summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-01-20 11:43:25 -0800
committerJunio C Hamano <gitster@pobox.com>2016-01-20 11:43:25 -0800
commitcc14ea8cf4520a9607fba4b1fbacea7fa9723c73 (patch)
treef5a5fb76eba752964fa48622cbce21f3b796f7f5 /read-cache.c
parent7a450b48e765e957762b015f30c89f21b1028771 (diff)
parent4d552005323034c1d6311796ac1074e9a4b4b57e (diff)
downloadgit-cc14ea8cf4520a9607fba4b1fbacea7fa9723c73.tar.gz
Merge branch 'nd/ita-cleanup'
Paths that have been told the index about with "add -N" are not quite yet in the index, but a few commands behaved as if they already are in a harmful way. * nd/ita-cleanup: grep: make it clear i-t-a entries are ignored add and use a convenience macro ce_intent_to_add() blame: remove obsolete comment
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 84616c8e21..5be7cd1dbf 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -327,7 +327,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);
@@ -1237,7 +1237,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;