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

Function validate_snapshot

refs/packed-backend.c:789–794  ·  view source on GitHub ↗

* Check that `refs->snapshot` (if present) still reflects the * contents of the `packed-refs` file. If not, clear the snapshot. */

Source from the content-addressed store, hash-verified

787 * contents of the `packed-refs` file. If not, clear the snapshot.
788 */
789static void validate_snapshot(struct packed_ref_store *refs)
790{
791 if (refs->snapshot &&
792 !stat_validity_check(&refs->snapshot->validity, refs->path))
793 clear_snapshot(refs);
794}
795
796/*
797 * Get the `snapshot` for the specified packed_ref_store, creating and

Callers 1

get_snapshotFunction · 0.85

Calls 2

stat_validity_checkFunction · 0.85
clear_snapshotFunction · 0.85

Tested by

no test coverage detected