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

Function get_shared_index_expire_date

read-cache.c:3172–3193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3170}
3171
3172static unsigned long get_shared_index_expire_date(void)
3173{
3174 static unsigned long shared_index_expire_date;
3175 static int shared_index_expire_date_prepared;
3176
3177 if (!shared_index_expire_date_prepared) {
3178 const char *shared_index_expire = "2.weeks.ago";
3179 char *value = NULL;
3180
3181 repo_config_get_expiry(the_repository, "splitindex.sharedindexexpire",
3182 &value);
3183 if (value)
3184 shared_index_expire = value;
3185
3186 shared_index_expire_date = approxidate(shared_index_expire);
3187 shared_index_expire_date_prepared = 1;
3188
3189 free(value);
3190 }
3191
3192 return shared_index_expire_date;
3193}
3194
3195static int should_delete_shared_index(const char *shared_index_path)
3196{

Callers 1

Calls 1

repo_config_get_expiryFunction · 0.85

Tested by

no test coverage detected