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

Function remove_one_note

builtin/notes.c:1020–1032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1018#define IGNORE_MISSING 1
1019
1020static int remove_one_note(struct notes_tree *t, const char *name, unsigned flag)
1021{
1022 int status;
1023 struct object_id oid;
1024 if (repo_get_oid(the_repository, name, &oid))
1025 return error(_("Failed to resolve '%s' as a valid ref."), name);
1026 status = remove_note(t, oid.hash);
1027 if (status)
1028 fprintf(stderr, _("Object %s has no note\n"), name);
1029 else
1030 fprintf(stderr, _("Removing note for object %s\n"), name);
1031 return (flag & IGNORE_MISSING) ? 0 : status;
1032}
1033
1034static int remove_cmd(int argc, const char **argv, const char *prefix,
1035 struct repository *repo UNUSED)

Callers 1

remove_cmdFunction · 0.85

Calls 3

repo_get_oidFunction · 0.85
errorFunction · 0.85
remove_noteFunction · 0.85

Tested by

no test coverage detected