@@ -149,20 +149,16 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
149149 git_set_exec_path (cmd + 1 );
150150 else {
151151 puts (git_exec_path ());
152- trace2_cmd_verb ("_query_" );
153152 exit (0 );
154153 }
155154 } else if (!strcmp (cmd , "--html-path" )) {
156155 puts (system_path (GIT_HTML_PATH ));
157- trace2_cmd_verb ("_query_" );
158156 exit (0 );
159157 } else if (!strcmp (cmd , "--man-path" )) {
160158 puts (system_path (GIT_MAN_PATH ));
161- trace2_cmd_verb ("_query_" );
162159 exit (0 );
163160 } else if (!strcmp (cmd , "--info-path" )) {
164161 puts (system_path (GIT_INFO_PATH ));
165- trace2_cmd_verb ("_query_" );
166162 exit (0 );
167163 } else if (!strcmp (cmd , "-p" ) || !strcmp (cmd , "--paginate" )) {
168164 use_pager = 1 ;
@@ -291,7 +287,6 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
291287 (* argv )++ ;
292288 (* argc )-- ;
293289 } else if (skip_prefix (cmd , "--list-cmds=" , & cmd )) {
294- trace2_cmd_verb ("_query_" );
295290 if (!strcmp (cmd , "parseopt" )) {
296291 struct string_list list = STRING_LIST_INIT_DUP ;
297292 int i ;
@@ -339,14 +334,9 @@ static int handle_alias(int *argcp, const char ***argv)
339334 commit_pager_choice ();
340335
341336 child .use_shell = 1 ;
342- child .trace2_child_class = "shell_alias" ;
343337 argv_array_push (& child .args , alias_string + 1 );
344338 argv_array_pushv (& child .args , (* argv ) + 1 );
345339
346- trace2_cmd_alias (alias_command , child .args .argv );
347- trace2_cmd_list_config ();
348- trace2_cmd_verb ("_run_shell_alias_" );
349-
350340 ret = run_command (& child );
351341 if (ret >= 0 ) /* normal exit */
352342 exit (ret );
@@ -381,9 +371,6 @@ static int handle_alias(int *argcp, const char ***argv)
381371 /* insert after command name */
382372 memcpy (new_argv + count , * argv + 1 , sizeof (char * ) * * argcp );
383373
384- trace2_cmd_alias (alias_command , new_argv );
385- trace2_cmd_list_config ();
386-
387374 * argv = new_argv ;
388375 * argcp += count - 1 ;
389376
@@ -496,8 +483,6 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
496483 die ("pre-command hook aborted command" );
497484
498485 trace_argv_printf (argv , "trace: built-in: git" );
499- trace2_cmd_verb (p -> cmd );
500- trace2_cmd_list_config ();
501486
502487 validate_cache_entries (& the_index );
503488 exit_code = status = p -> fn (argc , argv , prefix );
@@ -755,34 +740,23 @@ static void execv_dashed_external(const char **argv)
755740 cmd .clean_on_exit = 1 ;
756741 cmd .wait_after_clean = 1 ;
757742 cmd .silent_exec_failure = 1 ;
758- cmd .trace2_child_class = "dashed" ;
759743
760744 if (run_pre_command_hook (cmd .args .argv ))
761745 die ("pre-command hook aborted command" );
762746
763747 trace_argv_printf (cmd .args .argv , "trace: exec:" );
764- trace2_exec (NULL , cmd .args .argv );
765748
766749 /*
767750 * If we fail because the command is not found, it is
768751 * OK to return. Otherwise, we just pass along the status code,
769752 * or our usual generic code if we were not even able to exec
770753 * the program.
771- *
772- * If the child process ran and we are now going to exit, emit a
773- * generic string as our trace2 command verb to indicate that we
774- * launched a dashed command.
775754 */
776755 exit_code = status = run_command (& cmd );
777- trace2_exec_result (status );
778- if (status >= 0 ) {
779- trace2_cmd_verb ("_run_dashed_" );
756+ if (status >= 0 )
780757 exit (status );
781- }
782- else if (errno != ENOENT ) {
783- trace2_cmd_verb ("_run_dashed_" );
758+ else if (errno != ENOENT )
784759 exit (128 );
785- }
786760
787761 run_post_command_hook ();
788762}
@@ -809,15 +783,6 @@ static int run_argv(int *argcp, const char ***argv)
809783 struct argv_array args = ARGV_ARRAY_INIT ;
810784 int i ;
811785
812- /*
813- * The current process is committed to launching a
814- * child process to run the command named in (**argv)
815- * and exiting. Log a generic string as the trace2
816- * command verb to indicate this. Note that the child
817- * process will log the actual verb when it runs.
818- */
819- trace2_cmd_verb ("_run_git_alias_" );
820-
821786 if (get_super_prefix ())
822787 die ("%s doesn't support --super-prefix" , * * argv );
823788
@@ -833,8 +798,8 @@ static int run_argv(int *argcp, const char ***argv)
833798 * if we fail because the command is not found, it is
834799 * OK to return. Otherwise, we just pass along the status code.
835800 */
836- i = run_command_v_opt_tr2 (args .argv , RUN_SILENT_EXEC_FAILURE |
837- RUN_CLEAN_ON_EXIT , "git_alias" );
801+ i = run_command_v_opt (args .argv , RUN_SILENT_EXEC_FAILURE |
802+ RUN_CLEAN_ON_EXIT );
838803 if (i >= 0 || errno != ENOENT )
839804 exit (i );
840805 die ("could not execute builtin %s" , * * argv );
@@ -965,5 +930,5 @@ int cmd_main(int argc, const char **argv)
965930 fprintf (stderr , _ ("failed to run command '%s': %s\n" ),
966931 cmd , strerror (errno ));
967932
968- return trace2_cmd_exit ( 1 ) ;
933+ return 1 ;
969934}
0 commit comments