<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-submodule.txt, branch v2.45.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.45.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.45.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-12-26T19:06:55Z</updated>
<entry>
<title>doc: enforce dashes in placeholders</title>
<updated>2023-12-26T19:06:55Z</updated>
<author>
<name>Jean-Noël Avila</name>
<email>jn.avila@free.fr</email>
</author>
<published>2023-12-25T21:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2162f9f6f86df4f49c3a716b5beb3952104ea8b8'/>
<id>urn:sha1:2162f9f6f86df4f49c3a716b5beb3952104ea8b8</id>
<content type='text'>
The CodingGuidelines documents stipulates that multi-word placeholders
are to be separated by dashes, not underscores nor spaces.

Signed-off-by: Jean-Noël Avila &lt;jn.avila@free.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: highlight that .gitmodules does not support !command</title>
<updated>2023-07-25T21:55:07Z</updated>
<author>
<name>Petar Vutov</name>
<email>pvutov@imap.cc</email>
</author>
<published>2023-07-25T21:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7cebc5bd786a95722dc545a2cad22124ec996c00'/>
<id>urn:sha1:7cebc5bd786a95722dc545a2cad22124ec996c00</id>
<content type='text'>
Bugfix for fc01a5d2 (submodule update documentation: don't repeat
ourselves, 2016-12-27).

The `custom command` and `none` options are described as sharing the
same limitations, but one is allowed in .gitmodules and the other is
not.

Rewrite the description for custom commands to be more precise,
and make it easier for readers to notice that custom commands cannot
be used in the .gitmodules file.

Signed-off-by: Petar Vutov &lt;pvutov@imap.cc&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>clone, submodule: pass partial clone filters to submodules</title>
<updated>2022-02-09T23:38:36Z</updated>
<author>
<name>Josh Steadmon</name>
<email>steadmon@google.com</email>
</author>
<published>2022-02-05T05:00:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f05da2b48b48a46db65fc768b3ffecaf996dd655'/>
<id>urn:sha1:f05da2b48b48a46db65fc768b3ffecaf996dd655</id>
<content type='text'>
When cloning a repo with a --filter and with --recurse-submodules
enabled, the partial clone filter only applies to the top-level repo.
This can lead to unexpected bandwidth and disk usage for projects which
include large submodules. For example, a user might wish to make a
partial clone of Gerrit and would run:
`git clone --recurse-submodules --filter=blob:5k https://gerrit.googlesource.com/gerrit`.
However, only the superproject would be a partial clone; all the
submodules would have all blobs downloaded regardless of their size.
With this change, the same filter can also be applied to submodules,
meaning the expected bandwidth and disk savings apply consistently.

To avoid changing default behavior, add a new clone flag,
`--also-filter-submodules`. When this is set along with `--filter` and
`--recurse-submodules`, the filter spec is passed along to git-submodule
and git-submodule--helper, such that submodule clones also have the
filter applied.

This applies the same filter to the superproject and all submodules.
Users who need to customize the filter per-submodule would need to clone
with `--no-recurse-submodules` and then manually initialize each
submodule with the proper filter.

Applying filters to submodules should be safe thanks to Jonathan Tan's
recent work [1, 2, 3] eliminating the use of alternates as a method of
accessing submodule objects, so any submodule object access now triggers
a lazy fetch from the submodule's promisor remote if the accessed object
is missing. This patch is a reworked version of [4], which was created
prior to Jonathan Tan's work.

[1]: 8721e2e (Merge branch 'jt/partial-clone-submodule-1', 2021-07-16)
[2]: 11e5d0a (Merge branch 'jt/grep-wo-submodule-odb-as-alternate',
	2021-09-20)
[3]: 162a13b (Merge branch 'jt/no-abuse-alternate-odb-for-submodules',
	2021-10-25)
[4]: https://lore.kernel.org/git/52bf9d45b8e2b72ff32aa773f2415bf7b2b86da2.1563322192.git.steadmon@google.com/

Signed-off-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule: fall back to remote's HEAD for missing remote.&lt;name&gt;.branch</title>
<updated>2020-06-24T16:14:21Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2020-06-24T14:46:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f0a96e8d4c98c2394dc726b57b914f95cbc7a0de'/>
<id>urn:sha1:f0a96e8d4c98c2394dc726b57b914f95cbc7a0de</id>
<content type='text'>
When `remote.&lt;name&gt;.branch` is not configured, `git submodule update`
currently falls back to using the branch name `master`. A much better
idea, however, is to use the remote `HEAD`: on all Git servers running
reasonably recent Git versions, the symref `HEAD` points to the main
branch.

Note: t7419 demonstrates that there _might_ be use cases out there that
_expect_ `git submodule update --remote` to update submodules to the
remote `master` branch even if the remote `HEAD` points to another
branch. Arguably, this patch makes the behavior more intuitive, but
there is a slight possibility that this might cause regressions in
obscure setups.

Even so, it should be okay to fix this behavior without anything like a
longer transition period:

- The `git submodule update --remote` command is not really common.

- Current Git's behavior when running this command is outright
  confusing, unless the remote repository's current branch _is_ `master`
  (in which case the proposed behavior matches the old behavior).

- If a user encounters a regression due to the changed behavior, the fix
  is actually trivial: setting `submodule.&lt;name&gt;.branch` to `master`
  will reinstate the old behavior.

Helped-by: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'es/recursive-single-branch-clone'</title>
<updated>2020-03-05T18:43:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-03-05T18:43:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b22db265d6bde72391c8d47700dc781a3ea2ae41'/>
<id>urn:sha1:b22db265d6bde72391c8d47700dc781a3ea2ae41</id>
<content type='text'>
"git clone --recurse-submodules --single-branch" now uses the same
single-branch option when cloning the submodules.

* es/recursive-single-branch-clone:
  clone: pass --single-branch during --recurse-submodules
  submodule--helper: use C99 named initializer
</content>
</entry>
<entry>
<title>clone: pass --single-branch during --recurse-submodules</title>
<updated>2020-02-25T18:00:38Z</updated>
<author>
<name>Emily Shaffer</name>
<email>emilyshaffer@google.com</email>
</author>
<published>2020-02-21T03:10:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=132f600b060c2db7fd3d450dfadb6779a61c648a'/>
<id>urn:sha1:132f600b060c2db7fd3d450dfadb6779a61c648a</id>
<content type='text'>
Previously, performing "git clone --recurse-submodules --single-branch"
resulted in submodules cloning all branches even though the superproject
cloned only one branch. Pipe --single-branch through the submodule
helper framework to make it to 'clone' later on.

Signed-off-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Acked-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'km/submodule-doc-use-sm-path'</title>
<updated>2020-02-12T20:41:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-02-12T20:41:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b2099ebb123af2b299c8125b7a839df44faec68a'/>
<id>urn:sha1:b2099ebb123af2b299c8125b7a839df44faec68a</id>
<content type='text'>
Docfix.

* km/submodule-doc-use-sm-path:
  submodule foreach: replace $path with $sm_path in example
</content>
</entry>
<entry>
<title>submodule foreach: replace $path with $sm_path in example</title>
<updated>2020-01-31T20:57:18Z</updated>
<author>
<name>Kyle Meyer</name>
<email>kyle@kyleam.com</email>
</author>
<published>2020-01-31T17:08:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=04e5b3f0b43db43b3484f72058c080ac1a4a9b38'/>
<id>urn:sha1:04e5b3f0b43db43b3484f72058c080ac1a4a9b38</id>
<content type='text'>
f0fd0dc5c5 (submodule foreach: document '$sm_path' instead of '$path',
2018-05-08) updated the documentation to advise callers to favor
$sm_path over the deprecated synonym $path.  However, the example in
that section still uses $path.  Update it to use $sm_path.

Signed-off-by: Kyle Meyer &lt;kyle@kyleam.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tm/doc-submodule-absorb-fix'</title>
<updated>2020-01-08T20:44:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-01-08T20:44:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a4e4140ac909f0466af239fde2199a11d81bd751'/>
<id>urn:sha1:a4e4140ac909f0466af239fde2199a11d81bd751</id>
<content type='text'>
Typofix.

* tm/doc-submodule-absorb-fix:
  doc: submodule: fix typo for command absorbgitdirs
</content>
</entry>
<entry>
<title>doc: submodule: fix typo for command absorbgitdirs</title>
<updated>2020-01-06T17:24:46Z</updated>
<author>
<name>Thomas Menzel</name>
<email>dev@tomsit.de</email>
</author>
<published>2020-01-06T14:50:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5814d44d9b799764332b10413861537e9a88fb42'/>
<id>urn:sha1:5814d44d9b799764332b10413861537e9a88fb42</id>
<content type='text'>
The sentence wants to talk about the superproject's possesive, not plural form.

Signed-off-by: Thomas Menzel &lt;dev@tomsit.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
