Skip to content

Commit 09ac5db

Browse files
author
Git for Windows Build Agent
committed
Merge 'no-dashed-invocation' into HEAD
2 parents ab6e05c + d6d28b9 commit 09ac5db

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

git-rebase--merge.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ call_merge () {
6969
test -z "$strategy" && strategy=recursive
7070
# If cmt doesn't have a parent, don't include it as a base
7171
base=$(git rev-parse --verify --quiet $cmt^)
72-
eval 'git-merge-$strategy' $strategy_opts $base ' -- "$hd" "$cmt"'
72+
eval 'git merge-$strategy' $strategy_opts $base ' -- "$hd" "$cmt"'
7373
rv=$?
7474
case "$rv" in
7575
0)

git.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,31 @@ static int run_argv(int *argcp, const char ***argv)
604604
*/
605605
if (!done_alias)
606606
handle_builtin(*argcp, *argv);
607+
else if (get_builtin(**argv)) {
608+
struct argv_array args = ARGV_ARRAY_INIT;
609+
int i;
610+
611+
if (get_super_prefix())
612+
die("%s doesn't support --super-prefix", **argv);
613+
614+
commit_pager_choice();
615+
616+
argv_array_push(&args, "git");
617+
for (i = 0; i < *argcp; i++)
618+
argv_array_push(&args, (*argv)[i]);
619+
620+
trace_argv_printf(args.argv, "trace: exec:");
621+
622+
/*
623+
* if we fail because the command is not found, it is
624+
* OK to return. Otherwise, we just pass along the status code.
625+
*/
626+
i = run_command_v_opt(args.argv, RUN_SILENT_EXEC_FAILURE |
627+
RUN_CLEAN_ON_EXIT);
628+
if (i >= 0 || errno != ENOENT)
629+
exit(i);
630+
die("could not execute builtin %s", **argv);
631+
}
607632

608633
/* .. then try the external ones */
609634
execv_dashed_external(*argv);

0 commit comments

Comments
 (0)