Skip to content

Commit b914084

Browse files
dschogitster
authored andcommitted
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 595d59e (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3a94cb3 commit b914084

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

git.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,6 @@ static int run_argv(int *argcp, const char ***argv)
743743
*/
744744
if (!done_alias)
745745
handle_builtin(*argcp, *argv);
746-
747-
#if 0 // TODO In GFW, need to amend a7924b655e940b06cb547c235d6bed9767929673 to include trace2_ and _tr2 lines.
748746
else if (get_builtin(**argv)) {
749747
struct argv_array args = ARGV_ARRAY_INIT;
750748
int i;
@@ -779,7 +777,6 @@ static int run_argv(int *argcp, const char ***argv)
779777
exit(i);
780778
die("could not execute builtin %s", **argv);
781779
}
782-
#endif // a7924b655e940b06cb547c235d6bed9767929673
783780

784781
/* .. then try the external ones */
785782
execv_dashed_external(*argv);

0 commit comments

Comments
 (0)