MCPcopy Create free account
hub / github.com/git/git / replace_index_entry

Function replace_index_entry

read-cache.c:143–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143static void replace_index_entry(struct index_state *istate, int nr, struct cache_entry *ce)
144{
145 struct cache_entry *old = istate->cache[nr];
146
147 replace_index_entry_in_base(istate, old, ce);
148 remove_name_hash(istate, old);
149 discard_cache_entry(old);
150 ce->ce_flags &= ~CE_HASHED;
151 set_index_entry(istate, nr, ce);
152 ce->ce_flags |= CE_UPDATE_IN_BASE;
153 mark_fsmonitor_invalid(istate, ce);
154 istate->cache_changed |= CE_ENTRY_CHANGED;
155}
156
157void rename_index_entry_at(struct index_state *istate, int nr, const char *new_name)
158{

Callers 2

refresh_indexFunction · 0.85

Calls 5

remove_name_hashFunction · 0.85
discard_cache_entryFunction · 0.85
mark_fsmonitor_invalidFunction · 0.85
set_index_entryFunction · 0.70

Tested by

no test coverage detected