<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-submodule.sh, branch v2.14.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.14.3</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.14.3'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2017-09-10T08:03:06Z</updated>
<entry>
<title>Merge branch 'sb/submodule-parallel-update' into maint</title>
<updated>2017-09-10T08:03:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-09-10T08:03:06Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=95d25c412d140698ac0084bd94dcde8ecdcd332d'/>
<id>urn:sha1:95d25c412d140698ac0084bd94dcde8ecdcd332d</id>
<content type='text'>
Code clean-up.

* sb/submodule-parallel-update:
  submodule.sh: remove unused variable
</content>
</entry>
<entry>
<title>submodule.sh: remove unused variable</title>
<updated>2017-08-17T18:05:49Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2017-08-16T22:50:42Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=c8d0c4fe9b7987e2d68eb2b639d0f4eb5f89599b'/>
<id>urn:sha1:c8d0c4fe9b7987e2d68eb2b639d0f4eb5f89599b</id>
<content type='text'>
This could have been part of 48308681b0 (git submodule update: have a
dedicated helper for cloning, 2016-02-29).

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>scripts: use "git foo" not "git-foo"</title>
<updated>2017-08-07T19:04:45Z</updated>
<author>
<name>Michael Forney</name>
<email>mforney@mforney.org</email>
</author>
<published>2017-08-05T06:49:05Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=974ce8078c9a91190d798eaa65c9f173dd50c3f8'/>
<id>urn:sha1:974ce8078c9a91190d798eaa65c9f173dd50c3f8</id>
<content type='text'>
We want to make sure that people who copy &amp; paste code would see
fewer instances of "git-foo".  The use of these dashed forms have
been discouraged since v1.6.0 days.

Signed-off-by: Michael Forney &lt;mforney@mforney.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add: warn when adding an embedded repository</title>
<updated>2017-06-15T16:10:44Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2017-06-14T10:58:22Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=532139940c98a98bce2001bb495d75dec3d88e4d'/>
<id>urn:sha1:532139940c98a98bce2001bb495d75dec3d88e4d</id>
<content type='text'>
It's an easy mistake to add a repository inside another
repository, like:

  git clone $url
  git add .

The resulting entry is a gitlink, but there's no matching
.gitmodules entry. Trying to use "submodule init" (or clone
with --recursive) doesn't do anything useful. Prior to
v2.13, such an entry caused git-submodule to barf entirely.
In v2.13, the entry is considered "inactive" and quietly
ignored. Either way, no clone of your repository can do
anything useful with the gitlink without the user manually
adding the submodule config.

In most cases, the user probably meant to either add a real
submodule, or they forgot to put the embedded repository in
their .gitignore file.

Let's issue a warning when we see this case. There are a few
things to note:

  - the warning will go in the git-add porcelain; anybody
    wanting to do low-level manipulation of the index is
    welcome to create whatever funny states they want.

  - we detect the case by looking for a newly added gitlink;
    updates via "git add submodule" are perfectly reasonable,
    and this avoids us having to investigate .gitmodules
    entirely

  - there's a command-line option to suppress the warning.
    This is needed for git-submodule itself (which adds the
    entry before adding any submodule config), but also
    provides a mechanism for other scripts doing
    submodule-like things.

We could make this a hard error instead of a warning.
However, we do add lots of sub-repos in our test suite. It's
not _wrong_ to do so. It just creates a state where users
may be surprised. Pointing them in the right direction with
a gentle hint is probably the best option.

There is a config knob that can disable the (long) hint. But
I intentionally omitted a config knob to disable the warning
entirely. Whether the warning is sensible or not is
generally about context, not about the user's preferences.
If there's a tool or workflow that adds gitlinks without
matching .gitmodules, it should probably be taught about the
new command-line option, rather than blanket-disabling the
warning.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule: prevent backslash expantion in submodule names</title>
<updated>2017-04-17T03:09:36Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-04-07T17:23:06Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=cf9e55f49438d07dd554c5ade92f1c266363af36'/>
<id>urn:sha1:cf9e55f49438d07dd554c5ade92f1c266363af36</id>
<content type='text'>
When attempting to add a submodule with backslashes in its name 'git
submodule' fails in a funny way.  We can see that some of the
backslashes are expanded resulting in a bogus path:

git -C main submodule add ../sub\\with\\backslash
fatal: repository '/tmp/test/sub\witackslash' does not exist
fatal: clone of '/tmp/test/sub\witackslash' into submodule path

To solve this, convert calls to 'read' to 'read -r' in git-submodule.sh
in order to prevent backslash expantion in submodule names.

Reported-by: Joachim Durchholz &lt;jo@durchholz.org&gt;
Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule add: respect submodule.active and submodule.&lt;name&gt;.active</title>
<updated>2017-03-18T16:51:23Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-03-17T22:38:05Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=1b614c07d2428927358cc7317622913d1dbd59c9'/>
<id>urn:sha1:1b614c07d2428927358cc7317622913d1dbd59c9</id>
<content type='text'>
In addition to adding submodule.&lt;name&gt;.url to the config, set
submodule.&lt;name&gt;.active to true unless submodule.active is configured
and the submodule's path matches the configured pathspec.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule sync: use submodule--helper is-active</title>
<updated>2017-03-17T18:06:09Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-03-16T22:29:46Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=25b31f1b73331d3d9e90a72c34e514795e98c174'/>
<id>urn:sha1:25b31f1b73331d3d9e90a72c34e514795e98c174</id>
<content type='text'>
Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule sync: skip work for inactive submodules</title>
<updated>2017-03-17T18:06:09Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-03-16T22:29:45Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=e7849a9677e9db6af81f568ae40ad2eddf5d3f0d'/>
<id>urn:sha1:e7849a9677e9db6af81f568ae40ad2eddf5d3f0d</id>
<content type='text'>
Sync does some work determining what URLs should be used for a submodule
but then throws this work away if the submodule isn't active.  Instead
perform the activity check earlier and skip inactive submodule in order
to avoid doing unnecessary work.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule status: use submodule--helper is-active</title>
<updated>2017-03-17T18:06:09Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-03-16T22:29:44Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6dc9f01f33bdbaebcf811c89766d4e4902a96f27'/>
<id>urn:sha1:6dc9f01f33bdbaebcf811c89766d4e4902a96f27</id>
<content type='text'>
Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sb/submodule-update-initial-runs-custom-script'</title>
<updated>2017-02-03T19:25:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-02-03T19:25:19Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4ba6bb2d1792bd799b295b879461ee5453faab3e'/>
<id>urn:sha1:4ba6bb2d1792bd799b295b879461ee5453faab3e</id>
<content type='text'>
The user can specify a custom update method that is run when
"submodule update" updates an already checked out submodule.  This
was ignored when checking the submodule out for the first time and
we instead always just checked out the commit that is bound to the
path in the superproject's index.

* sb/submodule-update-initial-runs-custom-script:
  submodule update: run custom update script for initial populating as well
</content>
</entry>
</feed>
