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

Function update_common_dir

path.c:351–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351static void update_common_dir(struct strbuf *buf, int git_dir_len,
352 const char *common_dir)
353{
354 char *base = buf->buf + git_dir_len;
355 int has_lock_suffix = strbuf_strip_suffix(buf, LOCK_SUFFIX);
356
357 init_common_trie();
358 if (trie_find(&common_trie, base, check_common, NULL) > 0)
359 replace_dir(buf, git_dir_len, common_dir);
360
361 if (has_lock_suffix)
362 strbuf_addstr(buf, LOCK_SUFFIX);
363}
364
365void report_linked_checkout_garbage(struct repository *r)
366{

Callers 2

adjust_git_pathFunction · 0.85
do_submodule_pathFunction · 0.85

Calls 5

strbuf_strip_suffixFunction · 0.85
init_common_trieFunction · 0.85
trie_findFunction · 0.85
replace_dirFunction · 0.85
strbuf_addstrFunction · 0.85

Tested by

no test coverage detected