summaryrefslogtreecommitdiff
path: root/trace2.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-08-24 15:32:40 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-08-24 15:32:40 -0700
commit6f64eeab605b82b187b2dd1fc72492f434bad603 (patch)
tree476d9ccf008ab58bbdd8e479c45df7b4bc23a14c /trace2.c
parentMerge branch 'hn/refs-test-cleanup' (diff)
parenttr2: log parent process name (diff)
downloadtgif-6f64eeab605b82b187b2dd1fc72492f434bad603.tar.xz
Merge branch 'es/trace2-log-parent-process-name'
trace2 logs learned to show parent process name to see in what context Git was invoked. * es/trace2-log-parent-process-name: tr2: log parent process name tr2: make process info collection platform-generic
Diffstat (limited to 'trace2.c')
-rw-r--r--trace2.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/trace2.c b/trace2.c
index 256120c7fd..b9b154ac44 100644
--- a/trace2.c
+++ b/trace2.c
@@ -260,6 +260,19 @@ void trace2_cmd_path_fl(const char *file, int line, const char *pathname)
tgt_j->pfn_command_path_fl(file, line, pathname);
}
+void trace2_cmd_ancestry_fl(const char *file, int line, const char **parent_names)
+{
+ struct tr2_tgt *tgt_j;
+ int j;
+
+ if (!trace2_enabled)
+ return;
+
+ for_each_wanted_builtin (j, tgt_j)
+ if (tgt_j->pfn_command_ancestry_fl)
+ tgt_j->pfn_command_ancestry_fl(file, line, parent_names);
+}
+
void trace2_cmd_name_fl(const char *file, int line, const char *name)
{
struct tr2_tgt *tgt_j;