| 433 | } |
| 434 | |
| 435 | static void parse_cmd_symref_create(struct ref_transaction *transaction, |
| 436 | const char *next, const char *end UNUSED, |
| 437 | struct command_options *opts) |
| 438 | { |
| 439 | struct strbuf err = STRBUF_INIT; |
| 440 | char *refname, *new_target; |
| 441 | enum ref_transaction_error tx_err; |
| 442 | |
| 443 | refname = parse_refname(&next); |
| 444 | if (!refname) |
| 445 | die("symref-create: missing <ref>"); |
| 446 | |
| 447 | new_target = parse_next_refname(&next); |
| 448 | if (!new_target) |
| 449 | die("symref-create %s: missing <new-target>", refname); |
| 450 | |
| 451 | if (*next != line_termination) |
| 452 | die("symref-create %s: extra input: %s", refname, next); |
| 453 | |
| 454 | tx_err = ref_transaction_create(transaction, refname, NULL, new_target, |
| 455 | update_flags | create_reflog_flag, |
| 456 | msg, &err); |
| 457 | handle_ref_transaction_error(refname, NULL, NULL, new_target, NULL, |
| 458 | tx_err, &err, opts); |
| 459 | |
| 460 | update_flags = default_flags; |
| 461 | free(refname); |
| 462 | free(new_target); |
| 463 | strbuf_release(&err); |
| 464 | } |
| 465 | |
| 466 | static void parse_cmd_delete(struct ref_transaction *transaction, |
| 467 | const char *next, const char *end, |
nothing calls this directly
no test coverage detected