<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-submodule.sh, branch v2.9.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.9.3</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.9.3'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2016-08-08T21:21:46Z</updated>
<entry>
<title>Merge branch 'sb/submodule-deinit-all' into maint</title>
<updated>2016-08-08T21:21:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-08T21:21:46Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6a024a249fe4bc7ac9de4d8ffd5dfed0cf986fd7'/>
<id>urn:sha1:6a024a249fe4bc7ac9de4d8ffd5dfed0cf986fd7</id>
<content type='text'>
A comment update for a topic that was merged to Git v2.8.

* sb/submodule-deinit-all:
  submodule deinit: remove outdated comment
</content>
</entry>
<entry>
<title>submodule deinit: remove outdated comment</title>
<updated>2016-07-26T20:52:14Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-07-26T00:35:38Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=406621f43dcb91e5c38f0e1c73eab9aa5cc44843'/>
<id>urn:sha1:406621f43dcb91e5c38f0e1c73eab9aa5cc44843</id>
<content type='text'>
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule: remove bashism from shell script</title>
<updated>2016-06-01T18:32:53Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-06-01T00:27:59Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=44431df02459ec6c4d8c705dd15f376015407043'/>
<id>urn:sha1:44431df02459ec6c4d8c705dd15f376015407043</id>
<content type='text'>
Junio pointed out `relative_path` was using bashisms via the
local variables. As the longer term goal is to rewrite most of the
submodule code in C, do it now.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule--helper: offer a consistent API</title>
<updated>2016-06-01T18:31:49Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-05-31T23:59:33Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=b0f4b4084626ab0f87611acd89030e8bdf0b850e'/>
<id>urn:sha1:b0f4b4084626ab0f87611acd89030e8bdf0b850e</id>
<content type='text'>
In 48308681 (2016-02-29, git submodule update: have a dedicated helper
for cloning), the helper communicated errors back only via exit code,
and dance with printing '#unmatched' in case of error was left to
git-submodule.sh as it uses the output of the helper and pipes it into
shell commands. This change makes the helper consistent by never
printing '#unmatched' in the helper but always handling these piping
issues in the actual shell script.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/submodule-c-credential'</title>
<updated>2016-05-17T21:38:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-17T21:38:25Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=e059388fb200fb2b5281ce211242ef3525a9c2c7'/>
<id>urn:sha1:e059388fb200fb2b5281ce211242ef3525a9c2c7</id>
<content type='text'>
An earlier addition of "sanitize_submodule_env" with 14111fc4 (git:
submodule honor -c credential.* from command line, 2016-02-29)
turned out to be a convoluted no-op; implement what it wanted to do
correctly, and stop filtering settings given via "git -c var=val".

* jk/submodule-c-credential:
  submodule: stop sanitizing config options
  submodule: use prepare_submodule_repo_env consistently
  submodule--helper: move config-sanitizing to submodule.c
  submodule: export sanitized GIT_CONFIG_PARAMETERS
  t5550: break submodule config test into multiple sub-tests
  t5550: fix typo in $HTTPD_URL
</content>
</entry>
<entry>
<title>Merge branch 'sb/submodule-deinit-all'</title>
<updated>2016-05-17T21:38:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-17T21:38:19Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=21b2e60400754732bd509f393b3368f9fa530602'/>
<id>urn:sha1:21b2e60400754732bd509f393b3368f9fa530602</id>
<content type='text'>
Correct faulty recommendation to use "git submodule deinit ." when
de-initialising all submodules, which would result in a strange
error message in a pathological corner case.

* sb/submodule-deinit-all:
  submodule deinit: require '--all' instead of '.' for all submodules
</content>
</entry>
<entry>
<title>Merge branch 'sb/submodule-init'</title>
<updated>2016-05-17T21:38:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-17T21:38:16Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f2c96ceb57afd8c64c3e3e656f9390c95e9fbec9'/>
<id>urn:sha1:f2c96ceb57afd8c64c3e3e656f9390c95e9fbec9</id>
<content type='text'>
Update of "git submodule" to move pieces of logic to C continues.

* sb/submodule-init:
  submodule init: redirect stdout to stderr
  submodule--helper update-clone: abort gracefully on missing .gitmodules
  submodule init: fail gracefully with a missing .gitmodules file
  submodule: port init from shell to C
  submodule: port resolve_relative_url from shell to C
</content>
</entry>
<entry>
<title>submodule: stop sanitizing config options</title>
<updated>2016-05-06T19:54:27Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-05-05T01:22:19Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=89044baa8b8a14b48e78a42ebdc43cfcd144ce28'/>
<id>urn:sha1:89044baa8b8a14b48e78a42ebdc43cfcd144ce28</id>
<content type='text'>
The point of having a whitelist of command-line config
options to pass to submodules was two-fold:

  1. It prevented obvious nonsense like using core.worktree
     for multiple repos.

  2. It could prevent surprise when the user did not mean
     for the options to leak to the submodules (e.g.,
     http.sslverify=false).

For case 1, the answer is mostly "if it hurts, don't do
that". For case 2, we can note that any such example has a
matching inverted surprise (e.g., a user who meant
http.sslverify=true to apply everywhere, but it didn't).

So this whitelist is probably not giving us any benefit, and
is already creating a hassle as people propose things to put
on it. Let's just drop it entirely.

Note that we still need to keep a special code path for
"prepare the submodule environment", because we still have
to take care to pass through $GIT_CONFIG_PARAMETERS (and
block the rest of the repo-specific environment variables).

We can do this easily from within the submodule shell
script, which lets us drop the submodule--helper option
entirely (and it's OK to do so because as a "--" program, it
is entirely a private implementation detail).

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 deinit: require '--all' instead of '.' for all submodules</title>
<updated>2016-05-05T21:51:26Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-05-05T19:52:32Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f6a527997743b79d6986a16313a7488cfc53d123'/>
<id>urn:sha1:f6a527997743b79d6986a16313a7488cfc53d123</id>
<content type='text'>
The discussion in [1] pointed out that '.' is a faulty suggestion as
there is a corner case where it fails:

&gt; "submodule deinit ." may have "worked" in the sense that you would
&gt; have at least one path in your tree and avoided this "nothing
&gt; matches" most of the time.  It would have still failed with the
&gt; exactly same error if run in an empty repository, i.e.
&gt;
&gt;        $ E=/var/tmp/x/empty &amp;&amp; rm -fr "$E" &amp;&amp; mkdir -p "$E" &amp;&amp; cd "$E"
&gt;        $ git init
&gt;        $ rungit v2.6.6 submodule deinit .
&gt;        error: pathspec '.' did not match any file(s) known to git.
&gt;        Did you forget to 'git add'?
&gt;        $ &gt;file &amp;&amp; git add file
&gt;        $ rungit v2.6.6 submodule deinit .
&gt;        $ echo $?
&gt;        0

So instead of a pathspec add the '--all' option to deinit all submodules
and add a test to check for the corner case of an empty repository.

The code only needs to learn about the '--all' option and doesn't
require further changes as `git submodule--helper list "$@"` will list
all submodules when "$@" is empty.

[1] http://news.gmane.org/gmane.comp.version-control.git/289535

Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
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>submodule: export sanitized GIT_CONFIG_PARAMETERS</title>
<updated>2016-04-28T17:47:34Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-04-28T13:37:44Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=860cba61a3eac38151fd203547df7515023303e9'/>
<id>urn:sha1:860cba61a3eac38151fd203547df7515023303e9</id>
<content type='text'>
Commit 14111fc (git: submodule honor -c credential.* from
command line, 2016-02-29) taught git-submodule.sh to save
the sanitized value of $GIT_CONFIG_PARAMETERS when clearing
the environment for a submodule. However, it failed to
export the result, meaning that it had no effect for any
sub-programs.

We didn't catch this in our initial tests because we checked
only the "clone" case, which does not go through the shell
script at all. Provoking "git submodule update" to do a
fetch demonstrates the bug.

Noticed-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
