<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-submodule.txt, branch v2.13.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.13.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.13.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-03-18T16:51:23Z</updated>
<entry>
<title>submodule init: initialize active submodules</title>
<updated>2017-03-18T16:51:23Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-03-17T22:38:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3e7eaed016e6241e96de6a0140923e81cfc387e8'/>
<id>urn:sha1:3e7eaed016e6241e96de6a0140923e81cfc387e8</id>
<content type='text'>
Teach `submodule init` to initialize submodules which have been
configured to be active by setting 'submodule.active' with a pathspec.

Now if no path arguments are given and 'submodule.active' is configured,
`init` will initialize all submodules which have been configured to be
active.  If no path arguments are given and 'submodule.active' is not
configured, then `init` will retain the old behavior of initializing all
submodules.

This allows users to record more complex patterns as it saves retyping
them whenever you invoke update.

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 init: warn about falling back to a local path</title>
<updated>2017-02-28T21:46:22Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2017-02-25T01:31:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d1b3b81aabf91ce654b043b00aa72721a777c84c'/>
<id>urn:sha1:d1b3b81aabf91ce654b043b00aa72721a777c84c</id>
<content type='text'>
When a submodule is initialized, the config variable 'submodule.&lt;name&gt;.url'
is set depending on the value of the same variable in the .gitmodules
file. When the URL indicates to be relative, then the url is computed
relative to its default remote. The default remote cannot be determined
accurately in all cases, such that it falls back to 'origin'.

The 'origin' remote may not exist, though. In that case we give up looking
for a suitable remote and we'll just assume it to be a local relative path.

This can be confusing to users as there is a lot of guessing involved,
which is not obvious to the user.

So in the corner case of assuming a local autoritative truth, warn the
user to lessen the confusion.

This behavior was introduced in 4d6893200 (submodule add: allow relative
repository path even when no url is set, 2011-06-06), which shared the
code with submodule-init and then ported to C in 3604242f080a (submodule:
port init from shell to C, 2016-04-15).

In case of submodule-add, this behavior makes sense in some use cases[1],
however for submodule-init there does not seem to be an immediate obvious
use case to fall back to a local submodule. However there might be, so
warn instead of die here.

While adding the warning, also clarify the behavior of relative URLs in
the documentation.

[1] e.g. http://stackoverflow.com/questions/8721984/git-ignore-files-for-public-repository-but-not-for-private
"store a secret locally in a submodule, with no intention to publish it"

Reported-by: Shawn Pearce &lt;spearce@spearce.org&gt;
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/doc-submodule-markup-fix'</title>
<updated>2017-02-15T22:56:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-02-15T22:56:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3e23116d1f77f73714c67fe546d879f4bbb633a0'/>
<id>urn:sha1:3e23116d1f77f73714c67fe546d879f4bbb633a0</id>
<content type='text'>
Doc markup fix.

* jk/doc-submodule-markup-fix:
  docs/git-submodule: fix unbalanced quote
</content>
</entry>
<entry>
<title>docs/git-submodule: fix unbalanced quote</title>
<updated>2017-02-13T22:05:40Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2017-02-13T21:05:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e91461b3323ad75e02d2f4fa65b8482744f26036'/>
<id>urn:sha1:e91461b3323ad75e02d2f4fa65b8482744f26036</id>
<content type='text'>
The documentation gives an example of the submodule foreach
command that uses both backticks and single-quotes. We stick
the whole thing inside "+" markers to make it monospace, but
the inside punctuation still needs escaping. We handle the
backticks with "{backtick}", and use backslash-escaping for
the single-quotes.

But we missed the escaping on the second quote. Fortunately,
asciidoc renders this unbalanced quote as we want (showing
the quote), but asciidoctor does not. We could fix it by
adding the missing backslash.

However, let's take a step back. Even when rendered
correctly, it's hard to read a long command stuck into the
middle of a paragraph, and the important punctuation is hard
to notice. Let's instead bump it into its own single-line
code block. That makes both the source and the rendered
result more readable, and as a bonus we don't have to worry
about quoting at all.

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 update documentation: don't repeat ourselves</title>
<updated>2017-01-12T22:19:32Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-12-27T23:43:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fc01a5d26a8f0f80db8302d3ef3ce10924a68581'/>
<id>urn:sha1:fc01a5d26a8f0f80db8302d3ef3ce10924a68581</id>
<content type='text'>
The documentation for the `git submodule update` command, repeats itself
for each update option, "This is done when &lt;option&gt; is given, or no
option is given and `submodule.&lt;name&gt;.update` is set to &lt;string&gt;.

Avoid these repetitive clauses by stating the command line options take
precedence over configured options.

Also add 'none' to the list of options instead of mentioning it in the
following running text and split the list into two parts, one that is
accessible via the command line and one that is only reachable via the
configuration variables.

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 documentation: add options to the subcommand</title>
<updated>2017-01-12T22:19:32Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-12-27T23:43:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eb2f2f5f6a18e7b561beb5345fb1dcb4371c7152'/>
<id>urn:sha1:eb2f2f5f6a18e7b561beb5345fb1dcb4371c7152</id>
<content type='text'>
When reading up on a subcommand of `git submodule &lt;subcommand&gt;`,
it is convenient to have its options nearby and not just at the
top of the man page.  Add the options to each subcommand.

While at it, also document the `--checkout` option for `update`.

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: add absorb-git-dir function</title>
<updated>2016-12-12T23:15:07Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-12-12T19:04:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f6f858614003a3da794385cefdbddf00b85f7501'/>
<id>urn:sha1:f6f858614003a3da794385cefdbddf00b85f7501</id>
<content type='text'>
When a submodule has its git dir inside the working dir, the submodule
support for checkout that we plan to add in a later patch will fail.

Add functionality to migrate the git directory to be absorbed
into the superprojects git directory.

The newly added code in this patch is structured such that other areas of
Git can also make use of it. The code in the submodule--helper is a mere
wrapper and option parser for the function
`absorb_git_dir_into_superproject`, that takes care of embedding the
submodules git directory into the superprojects git dir. That function
makes use of the more abstract function for this use case
`relocate_gitdir`, which can be used by e.g. the worktree code eventually
to move around a git directory.

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>submodules doc: update documentation for "." used for submodule branches</title>
<updated>2016-10-19T21:58:53Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2016-10-19T20:42:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15ef78008aa6cdd42dbef3b1bd00ae64e4ab731a'/>
<id>urn:sha1:15ef78008aa6cdd42dbef3b1bd00ae64e4ab731a</id>
<content type='text'>
4d7bc52b17 ("submodule update: allow '.' for branch value",
2016-08-03) adopted from Gerrit a feature to set "." as a special
value of "submodule.&lt;name&gt;.branch" in .gitmodules file to indicate
that the tracking branch in the submodule should be the same as the
current branch in the superproject.

Update the documentation to describe this.

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 update: learn `--[no-]recommend-shallow` option</title>
<updated>2016-05-27T17:40:46Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-05-26T21:59:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=abed000acafd8aa86e02bcbb65fc1a8e4f06b8a0'/>
<id>urn:sha1:abed000acafd8aa86e02bcbb65fc1a8e4f06b8a0</id>
<content type='text'>
Sometimes the history of a submodule is not considered important by
the projects upstream. To make it easier for downstream users, allow
a boolean field 'submodule.&lt;name&gt;.shallow' in .gitmodules, which can
be used to recommend whether upstream considers the history important.

This field is honored in the initial clone by default, it can be
ignored by giving the `--no-recommend-shallow` option.

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 '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://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>
</feed>
