Soon, the db refs backend will use this to restart read transactions
after subcommands which might have modified the refs database.
Signed-off-by: David Turner <redacted>
---
run-command.c | 2 ++
run-command.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/run-command.c b/run-command.c
index ceee5d1..9ee6c85 100644
--- a/run-command.c
+++ b/run-command.c
@@ -19,6 +19,7 @@ struct child_to_clean {
};
static struct child_to_clean *children_to_clean;
static int installed_child_cleanup_handler;
+int total_commands_run = 0;
static void cleanup_children(int sig, int in_signal)
{@@ -349,6 +350,7 @@ fail_pipe:
cmd->err = fderr[0];
}
+ total_commands_run++;
trace_argv_printf(cmd->argv, "trace: run_command:");
fflush(NULL);
diff --git a/run-command.h b/run-command.h
index aa2a528..ef7ae7a 100644
--- a/run-command.h
+++ b/run-command.h
@@ -158,4 +158,5 @@ int run_processes_parallel(int n, void *data,
start_failure_fn,
return_value_fn);
+extern int total_commands_run;
#endif
--
2.4.2.644.g97b850b-twtrsrc