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 <rtenneti@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
Mike Frysinger 2021-06-14 16:09:29 -04:00
parent 4f21054c28
commit d88b369a42

View File

@ -43,10 +43,15 @@ class Command(object):
"""Base class for any command line action in repo. """Base class for any command line action in repo.
""" """
event_log = EventLog()
manifest = None manifest = None
_optparse = 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 # 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 # use it or it's a more uncommon command. This is used by the help command to
# show short-vs-full summaries. # show short-vs-full summaries.