File tree 1 file changed +25
-0
lines changed 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -687,6 +687,31 @@ static int run_argv(int *argcp, const char ***argv)
687
687
*/
688
688
if (!done_alias )
689
689
handle_builtin (* argcp , * argv );
690
+ else if (get_builtin (* * argv )) {
691
+ struct argv_array args = ARGV_ARRAY_INIT ;
692
+ int i ;
693
+
694
+ if (get_super_prefix ())
695
+ die ("%s doesn't support --super-prefix" , * * argv );
696
+
697
+ commit_pager_choice ();
698
+
699
+ argv_array_push (& args , "git" );
700
+ for (i = 0 ; i < * argcp ; i ++ )
701
+ argv_array_push (& args , (* argv )[i ]);
702
+
703
+ trace_argv_printf (args .argv , "trace: exec:" );
704
+
705
+ /*
706
+ * if we fail because the command is not found, it is
707
+ * OK to return. Otherwise, we just pass along the status code.
708
+ */
709
+ i = run_command_v_opt (args .argv , RUN_SILENT_EXEC_FAILURE |
710
+ RUN_CLEAN_ON_EXIT );
711
+ if (i >= 0 || errno != ENOENT )
712
+ exit (i );
713
+ die ("could not execute builtin %s" , * * argv );
714
+ }
690
715
691
716
/* .. then try the external ones */
692
717
execv_dashed_external (* argv );
You can’t perform that action at this time.
0 commit comments