<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/main.py, branch v2.70</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.70</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.70'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2026-09-21T20:39:16+00:00</updated>
<entry>
<title>project: render worktree status from one snapshot</title>
<updated>2026-09-21T20:39:16+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2026-08-25T15:47:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=c9448f986ef952487006e9c2d22989e98655c591'/>
<id>urn:sha1:c9448f986ef952487006e9c2d22989e98655c591</id>
<content type='text'>
Use porcelain-v2 branch and path records to replace the status display
fan-out with one Git process on Git 2.11 and newer. Preserve the legacy
renderer for older clients, force rename and ahead/behind behavior where
supported, and fall back to the old divergence query only when status
cannot supply branch.ab.

Bug: 543851900
Bug: 553599402
Change-Id: Ic760360f4f48ab9320abf69dbbb7310dab4ac649
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/632144
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Brian Gan &lt;brgan@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>Implement command forgiveness with autocorrect</title>
<updated>2026-03-24T22:47:37+00:00</updated>
<author>
<name>Sam Saccone</name>
<email>samccone@google.com</email>
</author>
<published>2026-03-10T17:26:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=242e97d9ddf1a62fa3d9e92e21bd8b98b00e4455'/>
<id>urn:sha1:242e97d9ddf1a62fa3d9e92e21bd8b98b00e4455</id>
<content type='text'>
Similar to `git`, when a user types an unknown command like `repo tart`,
we now use `difflib.get_close_matches` to suggest similar commands.

If `help.autocorrect` is set in the git config, it will optionally
prompt the user to automatically run the assumed command, or wait
for a configured delay before executing it.

Verification Steps:
1. Created a dummy repo project locally.
2. Verified `help.autocorrect=0|false|off|no|show` suggests
   command and exits.
3. Verified `help.autocorrect=1|true|on|yes|immediate`
   automatically runs suggestion.
4. Verified `help.autocorrect=&lt;number&gt;` runs after
   `&lt;number&gt;*0.1` seconds.
5. Verified `help.autocorrect=never` exits immediately without
   suggestions.
6. Verified `help.autocorrect=prompt` asks user to accept [y/n]
   and handles correctly.

BUG: b/489753302

Change-Id: I6dcd63229cbd7badf5404459b48690c68f5b4857
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/558021
Tested-by: Sam Saccone &lt;samccone@google.com&gt;
Commit-Queue: Sam Saccone &lt;samccone@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@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>standardize file header wrt licensing</title>
<updated>2025-08-21T18:04:41+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2025-08-21T14:25:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=5ed12ec81dbb1b2e612fe21f7579295c8d8cab33'/>
<id>urn:sha1:5ed12ec81dbb1b2e612fe21f7579295c8d8cab33</id>
<content type='text'>
We've been slightly inconsistent in the license header in files.
Standardize them so we can automate checking.

Change-Id: I3cdf85c9485d33cac2bb05c8080dfada3e5a5e8d
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/500102
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
Commit-Queue: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Remove gitc support from repo</title>
<updated>2024-12-03T22:27:56+00:00</updated>
<author>
<name>Josip Sokcevic</name>
<email>sokcevic@google.com</email>
</author>
<published>2024-12-03T21:29:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=cf411b3f03c3bd6001701136be5a874a85f1dc91'/>
<id>urn:sha1:cf411b3f03c3bd6001701136be5a874a85f1dc91</id>
<content type='text'>
gitc is no longer available.

Change-Id: I0cbfdf936832f2cdd4876104ae3cc5a6e26154e2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/444841
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Josip Sokcevic &lt;sokcevic@google.com&gt;
Tested-by: Josip Sokcevic &lt;sokcevic@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>main: Stringify project name in error_info</title>
<updated>2024-03-15T19:26:10+00:00</updated>
<author>
<name>Josip Sokcevic</name>
<email>sokcevic@chromium.org</email>
</author>
<published>2024-03-14T23:50:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=a3a73726129f7aa9cc12bbdc1f01700189936284'/>
<id>urn:sha1:a3a73726129f7aa9cc12bbdc1f01700189936284</id>
<content type='text'>
If a project can't be removed from checkout due to uncommitted changes
present, error.project is type of Project and not a string (as it is in
some cases). Project is not JSON serializable, resulting in exception
within exception handler:

TypeError: Object of type Project is not JSON serializable

This change casts project to string as a defensive mechanism. It also
passes project name instead of project object.

Change-Id: Ie7b782d73dc3647975755d5a3774d16ea6cd5348
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/413877
Tested-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Josip Sokcevic &lt;sokcevic@google.com&gt;
</content>
</entry>
<entry>
<title>trace: Save trace2 sid in REPO_TRACE file</title>
<updated>2024-02-22T20:55:09+00:00</updated>
<author>
<name>Josip Sokcevic</name>
<email>sokcevic@google.com</email>
</author>
<published>2024-02-21T19:04:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=8896b68926b660a90f37a9a37221c30514c52523'/>
<id>urn:sha1:8896b68926b660a90f37a9a37221c30514c52523</id>
<content type='text'>
git-trace2 events contain additional information what git is doing under
the hood, and repo doesn't have visibility into.

Instead of relying on timestamp information to match REPO_TRACE with
git-trace2 events, add SID information into REPO_TRACE.

Change-Id: I37672a3face81858072c7a3ce34ca3379199dab5
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/410280
Tested-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Josip Sokcevic &lt;sokcevic@google.com&gt;
</content>
</entry>
<entry>
<title>main: Log ManifestParseError exception messages</title>
<updated>2023-11-06T19:39:24+00:00</updated>
<author>
<name>LuK1337</name>
<email>priv.luk@gmail.com</email>
</author>
<published>2023-11-01T08:37:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=89f761cfefc406aabc5658e6c0a5cd25812d0525'/>
<id>urn:sha1:89f761cfefc406aabc5658e6c0a5cd25812d0525</id>
<content type='text'>
This lets us see manifest parsing error messages again.

Change-Id: I2d90b97cfb50e4520f79e75fa0d648c373b49e98
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/391477
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Commit-Queue: Łukasz Patron &lt;priv.luk@gmail.com&gt;
Tested-by: Łukasz Patron &lt;priv.luk@gmail.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>
</feed>
