| 1018 | #define IGNORE_MISSING 1 |
| 1019 | |
| 1020 | static 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 | |
| 1034 | static int remove_cmd(int argc, const char **argv, const char *prefix, |
| 1035 | struct repository *repo UNUSED) |
no test coverage detected