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