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

Function verify_clean_submodule

unpack-trees.c:2309–2318  ·  view source on GitHub ↗

* Check that checking out ce->sha1 in subdir ce->name is not * going to overwrite any working files. */

Source from the content-addressed store, hash-verified

2307 * going to overwrite any working files.
2308 */
2309static int verify_clean_submodule(const char *old_sha1,
2310 const struct cache_entry *ce,
2311 struct unpack_trees_options *o)
2312{
2313 if (!submodule_from_ce(ce))
2314 return 0;
2315
2316 return check_submodule_move_head(ce, old_sha1,
2317 oid_to_hex(&ce->oid), o);
2318}
2319
2320static int verify_clean_subdirectory(const struct cache_entry *ce,
2321 struct unpack_trees_options *o)

Callers 1

Calls 3

submodule_from_ceFunction · 0.85
oid_to_hexFunction · 0.85

Tested by

no test coverage detected