MCPcopy Index your code
hub / github.com/git/git / ce_compare_data

Function ce_compare_data

read-cache.c:233–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233static int ce_compare_data(struct index_state *istate,
234 const struct cache_entry *ce,
235 struct stat *st)
236{
237 int match = -1;
238 int fd = git_open_cloexec(ce->name, O_RDONLY);
239
240 if (fd >= 0) {
241 struct object_id oid;
242 if (!index_fd(istate, &oid, fd, st, OBJ_BLOB, ce->name, 0))
243 match = !oideq(&oid, &ce->oid);
244 /* index_fd() closed the file descriptor already */
245 }
246 return match;
247}
248
249static int ce_compare_link(const struct cache_entry *ce, size_t expected_size)
250{

Callers 1

ce_modified_check_fsFunction · 0.85

Calls 3

git_open_cloexecFunction · 0.85
index_fdFunction · 0.85
oideqFunction · 0.85

Tested by

no test coverage detected