<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/tests/test_subcmds_status.py, branch v2.68</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.68</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.68'/>
<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>status: Show ahead/behind info for local branches</title>
<updated>2026-06-30T18:13:14+00:00</updated>
<author>
<name>Brian Gan</name>
<email>brgan@google.com</email>
</author>
<published>2026-06-29T20:15:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=e7cac4bca6b8e4276a5a64287653b5c56555d6f4'/>
<id>urn:sha1:e7cac4bca6b8e4276a5a64287653b5c56555d6f4</id>
<content type='text'>
When viewing `repo status`, it is difficult to distinguish between branches that have active unpushed changes and stale branches that are fully synced. Previously, developers had to run commands like `repo forall -c "git status"` to see their ahead/behind counts.

This change updates Project.PrintWorkTreeStatus to automatically calculate and display the number of commits a branch is ahead and/or behind its upstream tracking branch. We use `git rev-list --left-right --count` to fetch this information natively and efficiently.

If the branch is completely synced with upstream, no extra text is shown.

Added tests for ahead-only, behind-only, diverged, no-tracking, and fully-synced branch states.

Bug: 319412954
Change-Id: I23879b2d472c7a7e11d01b565428a84b1b4f09c1
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/602423
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Brian Gan &lt;brgan@google.com&gt;
Commit-Queue: Brian Gan &lt;brgan@google.com&gt;
</content>
</entry>
<entry>
<title>tests: Add tests for repo status output</title>
<updated>2026-04-24T00:52:09+00:00</updated>
<author>
<name>Nasser Grainawi</name>
<email>nasser.grainawi@oss.qualcomm.com</email>
</author>
<published>2026-03-05T18:44:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=134eeb024bb172f425ef0823485b5cb537112f6c'/>
<id>urn:sha1:134eeb024bb172f425ef0823485b5cb537112f6c</id>
<content type='text'>
Build out status subcommand unit coverage using a minimal fake repo
checkout wired through XmlManifest.

The new tests verify:
- clean status output prints the expected project header
- modified tracked files appear with the expected status marker
- `-o` output includes the orphan section and orphan entries
- branch names shown in status reflect a started non-default branch

Change-Id: Ia7c22593d0bbdc4aed81faeb168b846f3e4016ab
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/558501
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Nasser Grainawi &lt;nasser.grainawi@oss.qualcomm.com&gt;
Commit-Queue: Nasser Grainawi &lt;nasser.grainawi@oss.qualcomm.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
</feed>
