| 4451 | } |
| 4452 | |
| 4453 | static int option_parse_missing_action(const struct option *opt UNUSED, |
| 4454 | const char *arg, int unset) |
| 4455 | { |
| 4456 | assert(arg); |
| 4457 | assert(!unset); |
| 4458 | |
| 4459 | if (!strcmp(arg, "error")) { |
| 4460 | arg_missing_action = MA_ERROR; |
| 4461 | fn_show_object = show_object; |
| 4462 | return 0; |
| 4463 | } |
| 4464 | |
| 4465 | if (!strcmp(arg, "allow-any")) { |
| 4466 | arg_missing_action = MA_ALLOW_ANY; |
| 4467 | fetch_if_missing = 0; |
| 4468 | fn_show_object = show_object__ma_allow_any; |
| 4469 | return 0; |
| 4470 | } |
| 4471 | |
| 4472 | if (!strcmp(arg, "allow-promisor")) { |
| 4473 | arg_missing_action = MA_ALLOW_PROMISOR; |
| 4474 | fetch_if_missing = 0; |
| 4475 | fn_show_object = show_object__ma_allow_promisor; |
| 4476 | return 0; |
| 4477 | } |
| 4478 | |
| 4479 | die(_("invalid value for '%s': '%s'"), "--missing", arg); |
| 4480 | return 0; |
| 4481 | } |
| 4482 | |
| 4483 | static void show_edge(struct commit *commit) |
| 4484 | { |
no test coverage detected