From d88b369a42462cf5fe4ff2a09b9b7b52e0ee333a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 14 Jun 2021 16:09:29 -0400 Subject: [PATCH] commands: document the "event_log" class attribute Add some notes explaining why it's instantiated at the Command class level and not individual objects. Change-Id: Ib8081bb8480e85f6d3dfc23953c6bbc6ecc64934 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/309323 Reviewed-by: Raman Tenneti Tested-by: Mike Frysinger --- command.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/command.py b/command.py index 8e930299..94f4d754 100644 --- a/command.py +++ b/command.py @@ -43,10 +43,15 @@ class Command(object): """Base class for any command line action in repo. """ - event_log = EventLog() manifest = None _optparse = None + # Singleton for all commands to track overall repo command execution and + # provide event summary to callers. Only used by sync subcommand currently. + # + # NB: This is being replaced by git trace2 events. See git_trace2_event_log. + event_log = EventLog() + # Whether this command is a "common" one, i.e. whether the user would commonly # use it or it's a more uncommon command. This is used by the help command to # show short-vs-full summaries.