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

Function notes_merge_abort

notes-merge.c:754–770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

752}
753
754int notes_merge_abort(struct notes_merge_options *o)
755{
756 /*
757 * Remove all files within .git/NOTES_MERGE_WORKTREE. We do not remove
758 * the .git/NOTES_MERGE_WORKTREE directory itself, since it might be
759 * the current working directory of the user.
760 */
761 struct strbuf buf = STRBUF_INIT;
762 int ret;
763
764 repo_git_path_replace(the_repository, &buf, NOTES_MERGE_WORKTREE);
765 if (o->verbosity >= 3)
766 printf("Removing notes merge worktree at %s/*\n", buf.buf);
767 ret = remove_dir_recursively(&buf, REMOVE_DIR_KEEP_TOPLEVEL);
768 strbuf_release(&buf);
769 return ret;
770}

Callers 1

merge_abortFunction · 0.85

Calls 3

repo_git_path_replaceFunction · 0.85
remove_dir_recursivelyFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected