<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git, 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-08-04T22:00:19+00:00</updated>
<entry>
<title>project: preserve -c optimization when revision is a SHA-1</title>
<updated>2026-08-04T22:00:19+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2026-08-04T20:13:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=d9da609d8c120bb882a43196a4a6b7f183418304'/>
<id>urn:sha1:d9da609d8c120bb882a43196a4a6b7f183418304</id>
<content type='text'>
Avoid disabling --current-branch when syncing a SHA-1 revision without
an explicit project upstream (e.g., smart tags). Resolve a fallback
upstream from dest-branch or manifest defaults so -c only fetches the
target branch.

Bug: 541240657
Change-Id: Ib44b6a732131210e1ec3a3136747d1a19bc5aa18
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/614762
Reviewed-by: Brian Gan &lt;brgan@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>command: Respect smart sync override declaratively by default</title>
<updated>2026-08-04T18:38:03+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2026-05-19T02:07:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=4bec297eb6e5f30ea2fe2a2d8a92054cafa30e4f'/>
<id>urn:sha1:4bec297eb6e5f30ea2fe2a2d8a92054cafa30e4f</id>
<content type='text'>
Introduce a `RESPECT_SMART_SYNC_OVERRIDE` class attribute to the base
`Command` class, defaulting to `True`. This allows subcommands to
automatically respect the smart sync override manifest if it exists.

The override is applied in `CommonValidateOptions` before any
subcommand-specific validation or execution occurs. The `sync` and
`init` commands explicitly opt out.

This ensures all workspace-aware subcommands consistently align with the
active smart sync override manifest. It also fixes a bug in
multi-manifest setups where running a command from a submanifest would
not apply the override to the outer manifest, causing inconsistency when
resolving projects across all manifests.

Bug: 279204331
Change-Id: I9426e90a13a77ce6bd94b4a82efda4d485cbe116
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/585081
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>project: derive HEAD fallback from git's own default branch</title>
<updated>2026-07-31T00:00:00+00:00</updated>
<author>
<name>Brian Gan</name>
<email>brgan@google.com</email>
</author>
<published>2026-07-30T23:21:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=54fa31cd844b3de887a1915755b110287a4d2bcb'/>
<id>urn:sha1:54fa31cd844b3de887a1915755b110287a4d2bcb</id>
<content type='text'>
When the default branch cannot be determined dynamically, repo fell back
to a hardcoded "refs/heads/master". This can point at a branch that does
not exist on the server, since projects increasingly default to "main".
Rather than swap one hardcoded name for another, ask git itself what it
would use.

Bug: 483758905
Change-Id: Ic66712acea98f8e548a2d6d8211865ee5c416b4d
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/612845
Tested-by: Brian Gan &lt;brgan@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Brian Gan &lt;brgan@google.com&gt;
</content>
</entry>
<entry>
<title>project: make GetHead file-read fallback reftable-aware</title>
<updated>2026-07-30T17:01:58+00:00</updated>
<author>
<name>Brian Gan</name>
<email>brgan@google.com</email>
</author>
<published>2026-07-29T23:25:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=29b6630a6532b20fc26c7b44d8fa69fd4db390a0'/>
<id>urn:sha1:29b6630a6532b20fc26c7b44d8fa69fd4db390a0</id>
<content type='text'>
When both `git symbolic-ref` and `git rev-parse` fail to resolve HEAD,
GetHead falls back to reading .git/HEAD directly. With the "reftable" ref
backend, .git/HEAD is only a stub pointing at the "refs/heads/.invalid"
placeholder while the real HEAD lives in the reftable stack. Reading the
stub returned that bogus placeholder value.

Detect the placeholder and treat HEAD as unresolvable (raising
NoManifestException) instead of returning the invalid ref.

Bug: 483758905
Change-Id: Ia0a825c0d1874686b98c5ddcdea6dc26c0d46784
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/612882
Tested-by: Brian Gan &lt;brgan@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Brian Gan &lt;brgan@google.com&gt;
</content>
</entry>
<entry>
<title>sync: allow syncing groups with repo sync -g group</title>
<updated>2026-07-21T20:42:38+00:00</updated>
<author>
<name>Andrew Chant</name>
<email>achant@google.com</email>
</author>
<published>2026-07-17T22:09:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=0b82311632d14d3f49675fb6a017c20f7a7dee37'/>
<id>urn:sha1:0b82311632d14d3f49675fb6a017c20f7a7dee37</id>
<content type='text'>
Similar to how repo init -g can restrict repo syncs to
a subset of the manifest globally, allow "repo sync -g" to only sync a
subset of projects from the manifest when running that specific
sync command.

Change-Id: I4929aad109de05c73a7db42bb27fd8d47eea32fc
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/609481
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Commit-Queue: Andrew Chant &lt;achant@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Andrew Chant &lt;achant@google.com&gt;
</content>
</entry>
<entry>
<title>git_superproject: don't filter rewritten manifest</title>
<updated>2026-07-21T20:42:30+00:00</updated>
<author>
<name>Andrew Chant</name>
<email>achant@google.com</email>
</author>
<published>2026-07-21T17:07:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=06c4f9e1cca33a51b5396de2d1d975648e9f2ce4'/>
<id>urn:sha1:06c4f9e1cca33a51b5396de2d1d975648e9f2ce4</id>
<content type='text'>
When creating the superproject manifest, take all groups
from the original manifest, including notdefault.

Using the ManifestGroupsStr will inadvertantly filter out
notdefault projects from the superproject manifest.

Change-Id: If3daf41e9a6572348de9182fe8679b90d3cec833
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/610021
Commit-Queue: Andrew Chant &lt;achant@google.com&gt;
Tested-by: Andrew Chant &lt;achant@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Deprecate fetch-submodules flag names</title>
<updated>2026-07-21T07:19:21+00:00</updated>
<author>
<name>Josef Malmström</name>
<email>josef.malmstrom@arm.com</email>
</author>
<published>2026-07-16T09:09:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=dd1130352be015979413da0caa3cbd882ee5bf87'/>
<id>urn:sha1:dd1130352be015979413da0caa3cbd882ee5bf87</id>
<content type='text'>
The names for flags --fetch-submodules / --no-fetch-submodules are
misleading, since they impact the full sync operation (fetch and
checkout), not just the fetching.

Introduce new flags --recurse-submodules / --no-recurse-submodules
and treat the old ones as deprecated aliases.

Change-Id: I78339a3e0496a855c222c1869b27b578507886a7
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/608881
Commit-Queue: Josef Malmstrom &lt;Josef.Malmstrom@arm.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Josef Malmstrom &lt;Josef.Malmstrom@arm.com&gt;
</content>
</entry>
<entry>
<title>hooks: pass yes flag when available</title>
<updated>2026-07-20T14:56:03+00:00</updated>
<author>
<name>Rahul Yadav</name>
<email>yadavrah@google.com</email>
</author>
<published>2026-07-10T15:39:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=eeba6f268d0220bc928ed7af41d310dfbe215205'/>
<id>urn:sha1:eeba6f268d0220bc928ed7af41d310dfbe215205</id>
<content type='text'>
Pass the -y flag as a keyword argument "yes" to the hook main function.
This allows upload hooks (such as auto-fixers) to automatically
apply fixes when the -y flag is passed, rather than prompting the user.

Bug: 498893733
Change-Id: I12096029aa3af471ba9175314d749deb0ebd1007
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/605261
Commit-Queue: Rahul Yadav &lt;yadavrah@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Rahul Yadav &lt;yadavrah@google.com&gt;
</content>
</entry>
<entry>
<title>project: Skip superproject upstream check for MetaProjects</title>
<updated>2026-07-16T18:51:00+00:00</updated>
<author>
<name>Ajay Gupta</name>
<email>ajagup@qti.qualcomm.com</email>
</author>
<published>2026-04-17T07:13:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=1729aaebaed8912cec20e5191d961400c08e98b1'/>
<id>urn:sha1:1729aaebaed8912cec20e5191d961400c08e98b1</id>
<content type='text'>
The superproject-gated upstream check in _CheckForImmutableRevision
only applies to user projects listed in the manifest. MetaProjects
(ManifestProject and RepoProject) never participate in a superproject
relationship, so evaluating git_superproject.UseSuperproject(...,
self.manifest) for them serves no purpose and, worse, calls the
manifest.superproject property which forces a manifest load.

During repo init, ManifestProject._ConfigureDependencies calls
self.Sync_NetworkHalf before manifest.xml has been linked into
.repo/. That reaches _CheckForImmutableRevision, which triggered the
manifest load and failed with:

  ManifestParseError: .../.repo/manifest.xml: [Errno 2] No such file
  or directory

breaking fresh repo init with SHA-based --manifest-branch combined
with --manifest-upstream-branch.

Factor the "should we consult the superproject for upstream?"
decision into a small overridable hook, _UseSuperprojectForUpstream.
Project's default delegates to git_superproject.UseSuperproject;
MetaProject overrides it to return False, localizing the
MetaProject-specific behavior to MetaProject.

Test verifies that calling _CheckForImmutableRevision on a
ManifestProject whose manifest.xml is not yet on disk returns False
without raising and does not create the file.

Change-Id: I22059109243d914036c06c6fe0081a5aba05da89
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/574201
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Ajay Gupta &lt;ajagup@qti.qualcomm.com&gt;
Tested-by: Ajay Gupta &lt;ajagup@qti.qualcomm.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Nasser Grainawi &lt;nasser.grainawi@oss.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>sync: Add CLI flag for globally disabling submodule fetch</title>
<updated>2026-07-16T08:19:51+00:00</updated>
<author>
<name>Josef Malmström</name>
<email>josef.malmstrom@arm.com</email>
</author>
<published>2026-07-13T10:50:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=978adb7ea504ae5c9238d03cea63f916035765c4'/>
<id>urn:sha1:978adb7ea504ae5c9238d03cea63f916035765c4</id>
<content type='text'>
A global setting for disabling fetching of submodules is useful
since this can currently otherwise only be done by modifying
the manifest, or by explicitly providing projects on command line.

Add this setting as --no-fetch-submodules to mirror the existing
--fetch-submodules.

Change-Id: Ic727c54f11a594aa52315751284b87138cf246bb
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/607641
Commit-Queue: Josef Malmstrom &lt;Josef.Malmstrom@arm.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Josef Malmstrom &lt;Josef.Malmstrom@arm.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
</feed>
