mirror of
https://github.com/git/git.git
synced 2026-01-21 16:06:04 +00:00
Merge 'no-dashed-invocation' into HEAD
This commit is contained in:
@@ -69,7 +69,7 @@ call_merge () {
|
||||
test -z "$strategy" && strategy=recursive
|
||||
# If cmt doesn't have a parent, don't include it as a base
|
||||
base=$(git rev-parse --verify --quiet $cmt^)
|
||||
eval 'git-merge-$strategy' $strategy_opts $base ' -- "$hd" "$cmt"'
|
||||
eval 'git merge-$strategy' $strategy_opts $base ' -- "$hd" "$cmt"'
|
||||
rv=$?
|
||||
case "$rv" in
|
||||
0)
|
||||
|
||||
25
git.c
25
git.c
@@ -604,6 +604,31 @@ static int run_argv(int *argcp, const char ***argv)
|
||||
*/
|
||||
if (!done_alias)
|
||||
handle_builtin(*argcp, *argv);
|
||||
else if (get_builtin(**argv)) {
|
||||
struct argv_array args = ARGV_ARRAY_INIT;
|
||||
int i;
|
||||
|
||||
if (get_super_prefix())
|
||||
die("%s doesn't support --super-prefix", **argv);
|
||||
|
||||
commit_pager_choice();
|
||||
|
||||
argv_array_push(&args, "git");
|
||||
for (i = 0; i < *argcp; i++)
|
||||
argv_array_push(&args, (*argv)[i]);
|
||||
|
||||
trace_argv_printf(args.argv, "trace: exec:");
|
||||
|
||||
/*
|
||||
* if we fail because the command is not found, it is
|
||||
* OK to return. Otherwise, we just pass along the status code.
|
||||
*/
|
||||
i = run_command_v_opt(args.argv, RUN_SILENT_EXEC_FAILURE |
|
||||
RUN_CLEAN_ON_EXIT);
|
||||
if (i >= 0 || errno != ENOENT)
|
||||
exit(i);
|
||||
die("could not execute builtin %s", **argv);
|
||||
}
|
||||
|
||||
/* .. then try the external ones */
|
||||
execv_dashed_external(*argv);
|
||||
|
||||
Reference in New Issue
Block a user