| 528 | } |
| 529 | |
| 530 | static void parse_cmd_verify(struct ref_transaction *transaction, |
| 531 | const char *next, const char *end, |
| 532 | struct command_options *opts UNUSED) |
| 533 | { |
| 534 | struct strbuf err = STRBUF_INIT; |
| 535 | char *refname; |
| 536 | struct object_id old_oid; |
| 537 | |
| 538 | refname = parse_refname(&next); |
| 539 | if (!refname) |
| 540 | die("verify: missing <ref>"); |
| 541 | |
| 542 | if (parse_next_oid(&next, end, &old_oid, "verify", refname, |
| 543 | PARSE_SHA1_OLD)) |
| 544 | oidclr(&old_oid, the_repository->hash_algo); |
| 545 | |
| 546 | if (*next != line_termination) |
| 547 | die("verify %s: extra input: %s", refname, next); |
| 548 | |
| 549 | if (ref_transaction_verify(transaction, refname, &old_oid, |
| 550 | NULL, update_flags, &err)) |
| 551 | die("%s", err.buf); |
| 552 | |
| 553 | update_flags = default_flags; |
| 554 | free(refname); |
| 555 | strbuf_release(&err); |
| 556 | } |
| 557 | |
| 558 | static void parse_cmd_symref_verify(struct ref_transaction *transaction, |
| 559 | const char *next, const char *end UNUSED, |
nothing calls this directly
no test coverage detected