git: avoid calling aliased builtins via their dashed form

This is one of the few places where Git violates its own deprecation of the dashed form. It is not necessary, either. As of 595d59e2b53 (git.c: ignore pager.* when launching builtin as dashed external, 2017-08-02), Git wants to ignore the pager.* config setting when expanding aliases. So let's strip out the check_pager_config(<command-name>) call from the copy-edited code. This code actually made it into upstream git.git already, but it was disabled in `#if 0 ... #endif` guards so far. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Jul 29, 2019 at 13:08 UTC b91408400757d021b10876c36280ef891b502420
1 file changed -3
git.c
-3
@@ -743,8 +743,6 @@ static int run_argv(int *argcp, const char ***argv)
743 */
744 if (!done_alias)
745 handle_builtin(*argcp, *argv);
746 -
747 -#if 0 // TODO In GFW, need to amend a7924b655e940b06cb547c235d6bed9767929673 to include trace2_ and _tr2 lines.
746 else if (get_builtin(**argv)) {
747 struct argv_array args = ARGV_ARRAY_INIT;
748 int i;
@@ -779,7 +777,6 @@ static int run_argv(int *argcp, const char ***argv)
777 exit(i);
778 die("could not execute builtin %s", **argv);
779 }
782 -#endif // a7924b655e940b06cb547c235d6bed9767929673
780
781 /* .. then try the external ones */
782 execv_dashed_external(*argv);