| 787 | } |
| 788 | |
| 789 | static void execv_dashed_external(const char **argv) |
| 790 | { |
| 791 | struct child_process cmd = CHILD_PROCESS_INIT; |
| 792 | int status; |
| 793 | |
| 794 | if (use_pager == -1 && !is_builtin(argv[0])) |
| 795 | use_pager = check_pager_config(the_repository, argv[0]); |
| 796 | commit_pager_choice(); |
| 797 | |
| 798 | strvec_pushf(&cmd.args, "git-%s", argv[0]); |
| 799 | strvec_pushv(&cmd.args, argv + 1); |
| 800 | cmd.clean_on_exit = 1; |
| 801 | cmd.wait_after_clean = 1; |
| 802 | cmd.silent_exec_failure = 1; |
| 803 | cmd.trace2_child_class = "dashed"; |
| 804 | |
| 805 | trace2_cmd_name("_run_dashed_"); |
| 806 | |
| 807 | /* |
| 808 | * The code in run_command() logs trace2 child_start/child_exit |
| 809 | * events, so we do not need to report exec/exec_result events here. |
| 810 | */ |
| 811 | trace_argv_printf(cmd.args.v, "trace: exec:"); |
| 812 | |
| 813 | /* |
| 814 | * If we fail because the command is not found, it is |
| 815 | * OK to return. Otherwise, we just pass along the status code, |
| 816 | * or our usual generic code if we were not even able to exec |
| 817 | * the program. |
| 818 | */ |
| 819 | status = run_command(&cmd); |
| 820 | |
| 821 | /* |
| 822 | * If the child process ran and we are now going to exit, emit a |
| 823 | * generic string as our trace2 command verb to indicate that we |
| 824 | * launched a dashed command. |
| 825 | */ |
| 826 | if (status >= 0) |
| 827 | exit(status); |
| 828 | else if (errno != ENOENT) |
| 829 | exit(128); |
| 830 | } |
| 831 | |
| 832 | static int is_deprecated_command(const char *cmd) |
| 833 | { |
no test coverage detected