<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/git_trace2_event_log_base.py, branch v2.66</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.66</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.66'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2026-06-30T11:44:38+00:00</updated>
<entry>
<title>git_trace2_event_log: Fix index out of range on empty config values</title>
<updated>2026-06-30T11:44:38+00:00</updated>
<author>
<name>Rahul Yadav</name>
<email>yadavrah@google.com</email>
</author>
<published>2026-06-29T09:27:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=a27dbcdb7bba1b8a2cc84112fa31c8f9f818604e'/>
<id>urn:sha1:a27dbcdb7bba1b8a2cc84112fa31c8f9f818604e</id>
<content type='text'>
In git_trace2_event_log_base.py's GetDataEventName method, it parses
value to identify if it represents a JSON list. When a config key has an
empty string value, GetDataEventName evaluates value[0], which raises
IndexError: string index out of range.

This change fixes the crash by checking if the value is a string and using
startswith/endswith to check for JSON lists instead of direct indexing.

Test: PYTHONPATH=. pytest tests/test_git_trace2_event_log.py

Bug: 512518342
TAG=agy
CONV=ff5d70d7-e5b3-42b3-8f16-23b9e3070754

Change-Id: Ic40a8c6a22df57d0e97f268f6e1bc8a14a5024a4
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/602201
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Rahul Yadav &lt;yadavrah@google.com&gt;
Commit-Queue: Rahul Yadav &lt;yadavrah@google.com&gt;
</content>
</entry>
<entry>
<title>Make git trace2 logging errors conditional on verbose mode.</title>
<updated>2026-02-03T19:53:48+00:00</updated>
<author>
<name>Sam Saccone</name>
<email>samccone@google.com</email>
</author>
<published>2026-01-29T21:41:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=62cd0de6cfbe7d2b7e966396d24bc337a962bdd7'/>
<id>urn:sha1:62cd0de6cfbe7d2b7e966396d24bc337a962bdd7</id>
<content type='text'>
Add a verbose attribute to the EventLog class, defaulting to False.
Error messages printed to sys.stderr within the EventLog.Write method
are now guarded by this verbose flag. In main.py, set EventLog.verbose
to True if the command-line --verbose option is used. This prevents
trace2 logging failures from being printed to stderr unless verbose
output is explicitly requested.

PROMPT=convert all git trace2 logging print messages to verbose only
logging

BUG: b/479811034
Change-Id: I8757ee52117d766f2f3ec47856db64cc4f51143c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/547542
Tested-by: Sam Saccone &lt;samccone@google.com&gt;
Reviewed-by: Julia Tuttle &lt;juliatuttle@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>Fix event log command event hierarchy.</title>
<updated>2024-11-22T18:39:41+00:00</updated>
<author>
<name>Josip Sokcevic</name>
<email>sokcevic@google.com</email>
</author>
<published>2024-11-22T00:02:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=fafd1ec23e8001dc7bdf87f2aa1f59051e33224d'/>
<id>urn:sha1:fafd1ec23e8001dc7bdf87f2aa1f59051e33224d</id>
<content type='text'>
command should be cmd_name, to match what git is emitting. This also
fixes arguments, so that only relevant arguments are passed instead
of the entire sys.args, which will contain wrapper information

Change-Id: Id436accfff511292ec2c56798fffb2306dda38fc
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/443741
Commit-Queue: Josip Sokcevic &lt;sokcevic@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
</content>
</entry>
<entry>
<title>git_trace2: Add socket timeout</title>
<updated>2023-12-19T19:38:52+00:00</updated>
<author>
<name>Josip Sokcevic</name>
<email>sokcevic@google.com</email>
</author>
<published>2023-12-19T17:45:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=e5fb6e585f593162ee2b10ad64cdd7ea2a577a06'/>
<id>urn:sha1:e5fb6e585f593162ee2b10ad64cdd7ea2a577a06</id>
<content type='text'>
repo blocks indefinitely until trace collector receives trace events,
which is not desired. This change adds a fixed timeout to connect and
send operations. It is possible that some events will be lost. repo logs
any failed trace operation.

Bug: b/316227772
Change-Id: I017636421b8e22ae3fcbab9e4eb2bee1d4fbbff4
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/398717
Tested-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
Commit-Queue: Josip Sokcevic &lt;sokcevic@google.com&gt;
Reviewed-by: Jason Chang &lt;jasonnc@google.com&gt;
</content>
</entry>
<entry>
<title>cleanup: Update codebase to expect Python 3.6</title>
<updated>2023-10-31T16:03:54+00:00</updated>
<author>
<name>Jason R. Coombs</name>
<email>jaraco@google.com</email>
</author>
<published>2023-09-29T15:04:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=b32ccbb66bb16965ecb8b4e266c4e45186636c1b'/>
<id>urn:sha1:b32ccbb66bb16965ecb8b4e266c4e45186636c1b</id>
<content type='text'>
- Bump minimum version to Python 3.6.
- Use f-strings in a lot of places.

Change-Id: I2aa70197230fcec2eff8e7c8eb754f20c08075bb
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/389034
Tested-by: Jason R. Coombs &lt;jaraco@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Commit-Queue: Jason R. Coombs &lt;jaraco@google.com&gt;
</content>
</entry>
<entry>
<title>delete Python 2 (object) compat</title>
<updated>2023-10-20T04:51:01+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2023-10-19T09:13:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=d4aee6570b64c5b6de584b0a5ce76e6a139faf38'/>
<id>urn:sha1:d4aee6570b64c5b6de584b0a5ce76e6a139faf38</id>
<content type='text'>
Bug: 302871152
Change-Id: I39636d73a6e1d69efa8ade74f75c5381651e6dc8
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/390054
Commit-Queue: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Aravind Vasudevan &lt;aravindvasudev@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Use non-deprecated API for obtaining UTC time</title>
<updated>2023-09-18T23:59:37+00:00</updated>
<author>
<name>LuK1337</name>
<email>priv.luk@gmail.com</email>
</author>
<published>2023-09-16T07:36:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=aadd12cb08bede15946bc790f6005bbe120c17bc'/>
<id>urn:sha1:aadd12cb08bede15946bc790f6005bbe120c17bc</id>
<content type='text'>
DeprecationWarning: datetime.datetime.utcnow() is deprecated and
scheduled for removal in a future version. Use timezone-aware objects to
represent datetimes in UTC: datetime.datetime.now(datetime.UTC).

Change-Id: Ia2c46fb87c544d98cc2dd68a829f67d4770b479c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/386615
Tested-by: Łukasz Patron &lt;priv.luk@gmail.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Łukasz Patron &lt;priv.luk@gmail.com&gt;
Commit-Queue: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Log ErrorEvent for failing GitCommands</title>
<updated>2023-09-06T18:22:33+00:00</updated>
<author>
<name>Jason Chang</name>
<email>jasonnc@google.com</email>
</author>
<published>2023-09-01T23:07:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=f19b310f15e03e92075e7409c9d7f0956acc007d'/>
<id>urn:sha1:f19b310f15e03e92075e7409c9d7f0956acc007d</id>
<content type='text'>
Change-Id: I270af7401cff310349e736bef87e9b381cc4d016
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/385054
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Jason Chang &lt;jasonnc@google.com&gt;
Tested-by: Jason Chang &lt;jasonnc@google.com&gt;
</content>
</entry>
</feed>
