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

Function should_delete_shared_index

read-cache.c:3195–3210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3193}
3194
3195static int should_delete_shared_index(const char *shared_index_path)
3196{
3197 struct stat st;
3198 unsigned long expiration;
3199
3200 /* Check timestamp */
3201 expiration = get_shared_index_expire_date();
3202 if (!expiration)
3203 return 0;
3204 if (stat(shared_index_path, &st))
3205 return error_errno(_("could not stat '%s'"), shared_index_path);
3206 if (st.st_mtime > expiration)
3207 return 0;
3208
3209 return 1;
3210}
3211
3212static int clean_shared_index_files(const char *current_hex)
3213{

Callers 1

clean_shared_index_filesFunction · 0.85

Calls 3

error_errnoFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected