<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-submodule.sh, branch v1.8.2.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.8.2.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.8.2.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2013-04-01T14:37:34Z</updated>
<entry>
<title>submodule summary: support --summary-limit=&lt;n&gt;</title>
<updated>2013-04-01T14:37:34Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2013-04-01T13:06:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=862ae6cd67ff79c0ec6629e78ea4cb24a1ae3db1'/>
<id>urn:sha1:862ae6cd67ff79c0ec6629e78ea4cb24a1ae3db1</id>
<content type='text'>
In addition to "--summary-limit &lt;n&gt;" support the form "--summary-limit=&lt;n&gt;",
for consistency with other parameters and commands.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'we/submodule-update-prefix-output' into maint</title>
<updated>2013-03-26T19:44:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-03-26T19:44:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=50734ea0af6b92b82ade0be23db382ab87f9294a'/>
<id>urn:sha1:50734ea0af6b92b82ade0be23db382ab87f9294a</id>
<content type='text'>
"git submodule update", when recursed into sub-submodules, did not
acccumulate the prefix paths.

* we/submodule-update-prefix-output:
  submodule update: when using recursion, show full path
</content>
</entry>
<entry>
<title>submodule update: when using recursion, show full path</title>
<updated>2013-03-04T03:46:54Z</updated>
<author>
<name>William Entriken</name>
<email>fulldecent@gmail.com</email>
</author>
<published>2013-03-02T19:44:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=75bf5e60e8c09075af1e4cd0d68a6d73fdf92c42'/>
<id>urn:sha1:75bf5e60e8c09075af1e4cd0d68a6d73fdf92c42</id>
<content type='text'>
Previously when using update with recursion, only the path for the
inner-most module was printed. Now the path is printed relative to
the directory the command was started from. This now matches the
behavior of submodule foreach.

Signed-off-by: William Entriken &lt;github.com@phor.net&gt;
Acked-by: Jens Lehmann &lt;Jens.Lehmann@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Allow custom "comment char"</title>
<updated>2013-01-16T20:48:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-16T19:18:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eff80a9fd990de3605063050dae32f969ef18ba8'/>
<id>urn:sha1:eff80a9fd990de3605063050dae32f969ef18ba8</id>
<content type='text'>
Some users do want to write a line that begin with a pound sign, #,
in their commit log message.  Many tracking system recognise
a token of #&lt;bugid&gt; form, for example.

The support we offer these use cases is not very friendly to the end
users.  They have a choice between

 - Don't do it.  Avoid such a line by rewrapping or indenting; and

 - Use --cleanup=whitespace but remove all the hint lines we add.

Give them a way to set a custom comment char, e.g.

    $ git -c core.commentchar="%" commit

so that they do not have to do either of the two workarounds.

[jc: although I started the topic, all the tests and documentation
updates, many of the call sites of the new strbuf_add_commented_*()
functions, and the change to git-submodule.sh scripted Porcelain are
from Ralf.]

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Ralf Thielow &lt;ralf.thielow@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule add: If --branch is given, record it in .gitmodules</title>
<updated>2012-12-19T17:40:51Z</updated>
<author>
<name>W. Trevor King</name>
<email>wking@tremily.us</email>
</author>
<published>2012-12-19T16:03:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b928922727d6691a3bdc28160f93f25712c565f6'/>
<id>urn:sha1:b928922727d6691a3bdc28160f93f25712c565f6</id>
<content type='text'>
This allows you to easily record a submodule.&lt;name&gt;.branch option in
.gitmodules when you add a new submodule.  With this patch,

  $ git submodule add -b &lt;branch&gt; &lt;repository&gt; [&lt;path&gt;]
  $ git config -f .gitmodules submodule.&lt;path&gt;.branch &lt;branch&gt;

reduces to

  $ git submodule add -b &lt;branch&gt; &lt;repository&gt; [&lt;path&gt;]

This means that future calls to

  $ git submodule update --remote ...

will get updates from the same branch that you used to initialize the
submodule, which is usually what you want.

Signed-off-by: W. Trevor King &lt;wking@tremily.us&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule update: add --remote for submodule's upstream changes</title>
<updated>2012-12-19T17:40:01Z</updated>
<author>
<name>W. Trevor King</name>
<email>wking@tremily.us</email>
</author>
<published>2012-12-19T16:03:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=06b1abb5bd38b3cb1972907b059c7f95a197a7a5'/>
<id>urn:sha1:06b1abb5bd38b3cb1972907b059c7f95a197a7a5</id>
<content type='text'>
The current `update` command incorporates the superproject's gitlinked
SHA-1 ($sha1) into the submodule HEAD ($subsha1).  Depending on the
options you use, it may checkout $sha1, rebase the $subsha1 onto
$sha1, or merge $sha1 into $subsha1.  This helps you keep up with
changes in the upstream superproject.

However, it's also useful to stay up to date with changes in the
upstream subproject.  Previous workflows for incorporating such
changes include the ungainly:

  $ git submodule foreach 'git checkout $(git config --file $toplevel/.gitmodules submodule.$name.branch) &amp;&amp; git pull'

With this patch, all of the useful functionality for incorporating
superproject changes can be reused to incorporate upstream subproject
updates.  When you specify --remote, the target $sha1 is replaced with
a $sha1 of the submodule's origin/master tracking branch.  If you want
to merge a different tracking branch, you can configure the
`submodule.&lt;name&gt;.branch` option in `.gitmodules`.  You can override
the `.gitmodules` configuration setting for a particular superproject
by configuring the option in that superproject's default configuration
(using the usual configuration hierarchy, e.g. `.git/config`,
`~/.gitconfig`, etc.).

Previous use of submodule.&lt;name&gt;.branch
=======================================

Because we're adding a new configuration option, it's a good idea to
check if anyone else is already using the option.  The foreach-pull
example above was described by Ævar in

  commit f030c96d8643fa0a1a9b2bd9c2f36a77721fb61f
  Author: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
  Date:   Fri May 21 16:10:10 2010 +0000

    git-submodule foreach: Add $toplevel variable

Gerrit uses the same interpretation for the setting, but because
Gerrit has direct access to the subproject repositories, it updates
the superproject repositories automatically when a subproject changes.
Gerrit also accepts the special value '.', which it expands into the
superproject's branch name.

Although the --remote functionality is using `submodule.&lt;name&gt;.branch`
slightly differently, the effect is the same.  The foreach-pull
example uses the option to record the name of the local branch to
checkout before pulls.  The tracking branch to be pulled is recorded
in `.git/modules/&lt;name&gt;/config`, which was initialized by the module
clone during `submodule add` or `submodule init`.  Because the branch
name stored in `submodule.&lt;name&gt;.branch` was likely the same as the
branch name used during the initial `submodule add`, the same branch
will be pulled in each workflow.

Implementation details
======================

In order to ensure a current tracking branch state, `update --remote`
fetches the submodule's remote repository before calculating the
SHA-1.  However, I didn't change the logic guarding the existing fetch:

  if test -z "$nofetch"
  then
    # Run fetch only if $sha1 isn't present or it
    # is not reachable from a ref.
    (clear_local_git_env; cd "$path" &amp;&amp;
      ( (rev=$(git rev-list -n 1 $sha1 --not --all 2&gt;/dev/null) &amp;&amp;
       test -z "$rev") || git-fetch)) ||
    die "$(eval_gettext "Unable to fetch in submodule path '\$path'")"
  fi

There will not be a double-fetch, because the new $sha1 determined
after the `--remote` triggered fetch should always exist in the
repository.  If it doesn't, it's because some racy process removed it
from the submodule's repository and we *should* be re-fetching.

Signed-off-by: W. Trevor King &lt;wking@tremily.us&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule: add get_submodule_config helper funtion</title>
<updated>2012-12-12T05:46:49Z</updated>
<author>
<name>W. Trevor King</name>
<email>wking@tremily.us</email>
</author>
<published>2012-12-11T18:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=88ce00c378f709937c74a97037aa2692b883d683'/>
<id>urn:sha1:88ce00c378f709937c74a97037aa2692b883d683</id>
<content type='text'>
Several submodule configuration variables
(e.g. fetchRecurseSubmodules) are read from .gitmodules with local
overrides from the usual git config files.  This shell function mimics
that logic to help initialize configuration variables in
git-submodule.sh.

Signed-off-by: W. Trevor King &lt;wking@tremily.us&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'wtk/submodule-doc-fixup'</title>
<updated>2012-11-21T21:25:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-11-21T21:25:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=681b036fa0461fa40f5c8caedd06579ab52e671e'/>
<id>urn:sha1:681b036fa0461fa40f5c8caedd06579ab52e671e</id>
<content type='text'>
* wtk/submodule-doc-fixup:
  git-submodule: wrap branch option with "&lt;&gt;" in usage strings.
</content>
</entry>
<entry>
<title>Merge branch 'ph/submodule-sync-recursive'</title>
<updated>2012-11-15T18:24:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-11-15T18:24:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a1b3293936e3ee3a431051d12744876e4f5b21eb'/>
<id>urn:sha1:a1b3293936e3ee3a431051d12744876e4f5b21eb</id>
<content type='text'>
Adds "--recursive" option to submodule sync.

* ph/submodule-sync-recursive:
  Add tests for submodule sync --recursive
  Teach --recursive to submodule sync
</content>
</entry>
<entry>
<title>Merge branch 'ph/maint-submodule-status-fix'</title>
<updated>2012-11-09T17:51:15Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-11-09T17:51:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b0b00a3ee43b4813eb85728a482500f6422499fd'/>
<id>urn:sha1:b0b00a3ee43b4813eb85728a482500f6422499fd</id>
<content type='text'>
Cleans up some leftover bits from an earlier submodule change.

* ph/maint-submodule-status-fix:
  submodule status: remove unused orig_* variables
  t7407: Fix recursive submodule test
</content>
</entry>
</feed>
