<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-submodule.sh, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-12-11T11:46:48Z</updated>
<entry>
<title>git-submodule.sh: rename some variables</title>
<updated>2024-12-11T11:46:48Z</updated>
<author>
<name>Roy Eldar</name>
<email>royeldar0@gmail.com</email>
</author>
<published>2024-12-11T06:32:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b86f0f9071dd881a14cb9a71d94a66ae3186a2b9'/>
<id>urn:sha1:b86f0f9071dd881a14cb9a71d94a66ae3186a2b9</id>
<content type='text'>
Every switch and option which is passed to git-submodule.sh has a
corresponding variable which is set accordingly; by convention, the name
of the variable is the option name (for example, "--jobs" and "$jobs").

Rename "$custom_name", "$deinit_all" and "$nofetch", for consistency.

Signed-off-by: Roy Eldar &lt;royeldar0@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-submodule.sh: improve variables readability</title>
<updated>2024-12-11T11:46:48Z</updated>
<author>
<name>Roy Eldar</name>
<email>royeldar0@gmail.com</email>
</author>
<published>2024-12-11T06:32:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3ad0ba72274436f4e1eef6bed392e3e875484e2b'/>
<id>urn:sha1:3ad0ba72274436f4e1eef6bed392e3e875484e2b</id>
<content type='text'>
When git-submodule.sh parses various options and switches, it sets some
variables to values; the variables in turn affect the options given to
git-submodule--helper.

Currently, variables which correspond to switches have boolean values
(for example, whenever "--force" is passed, force=1), while variables
which correspond to options which take arguments have string values that
sometimes contain the option name and sometimes only the option value.

Set all of the variables to strings which contain the option name (e.g.
force="--force" rather than force=1); this has a couple of advantages:
it improves consistency, readability and debuggability.

Suggested-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Roy Eldar &lt;royeldar0@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-submodule.sh: add some comments</title>
<updated>2024-12-11T11:46:48Z</updated>
<author>
<name>Roy Eldar</name>
<email>royeldar0@gmail.com</email>
</author>
<published>2024-12-11T06:32:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=57f9b30fcd7707b3917d96e98dc109fb541cd30b'/>
<id>urn:sha1:57f9b30fcd7707b3917d96e98dc109fb541cd30b</id>
<content type='text'>
Add a couple of comments in a few functions where they were missing.

Signed-off-by: Roy Eldar &lt;royeldar0@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-submodule.sh: get rid of unused variable</title>
<updated>2024-12-11T11:46:48Z</updated>
<author>
<name>Roy Eldar</name>
<email>royeldar0@gmail.com</email>
</author>
<published>2024-12-11T06:32:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=402e46daf5ebf96f2cb31bf37e3d1637247688e5'/>
<id>urn:sha1:402e46daf5ebf96f2cb31bf37e3d1637247688e5</id>
<content type='text'>
Remove the variable "$diff_cmd" which is no longer used.

Signed-off-by: Roy Eldar &lt;royeldar0@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-submodule.sh: get rid of isnumber</title>
<updated>2024-12-11T11:46:47Z</updated>
<author>
<name>Roy Eldar</name>
<email>royeldar0@gmail.com</email>
</author>
<published>2024-12-11T06:32:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=006f546bc30bd42de6ba569ab70ec80441f54430'/>
<id>urn:sha1:006f546bc30bd42de6ba569ab70ec80441f54430</id>
<content type='text'>
It's entirely unnecessary to check whether the argument given to an
option (i.e. --summary-limit) is valid in the shell wrapper, since it's
already done when parsing the various options in git-submodule--helper.

Remove this check from the script; this both improves consistency
throughout the script, and the error message shown to the user in case
some invalid non-numeric argument was passed to "--summary-limit" is
more informative as well.

Signed-off-by: Roy Eldar &lt;royeldar0@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-submodule.sh: improve parsing of short options</title>
<updated>2024-12-11T11:46:47Z</updated>
<author>
<name>Roy Eldar</name>
<email>royeldar0@gmail.com</email>
</author>
<published>2024-12-11T06:32:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e6c3e349458ec2ad36addc6004cffcfa6d663c38'/>
<id>urn:sha1:e6c3e349458ec2ad36addc6004cffcfa6d663c38</id>
<content type='text'>
Some command-line options have a short form which takes an argument; for
example, "--jobs" has the form "-j", and it takes a numerical argument.

When parsing short options, support the case where there is no space
between the flag and the option argument, in order to improve
consistency with the rest of the builtin git commands.

Signed-off-by: Roy Eldar &lt;royeldar0@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-submodule.sh: improve parsing of some long options</title>
<updated>2024-12-11T11:46:47Z</updated>
<author>
<name>Roy Eldar</name>
<email>royeldar0@gmail.com</email>
</author>
<published>2024-12-11T06:32:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b71687ca03fe5909eae54cd6f2e044822ca335de'/>
<id>urn:sha1:b71687ca03fe5909eae54cd6f2e044822ca335de</id>
<content type='text'>
Some command-line options have a long form which takes an argument. In
this case, the argument can be given right after `='; for example,
"--depth" takes a numerical argument, which can be given as "--depth=X".

Support the case where the argument is given right after `=' for all
long options, in order to improve consistency throughout the script.

Signed-off-by: Roy Eldar &lt;royeldar0@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/submodule: allow "add" to use different ref storage format</title>
<updated>2024-08-08T16:22:21Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-08-08T07:35:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c369fc46d079447d216f7ef309ff60abe493cdb6'/>
<id>urn:sha1:c369fc46d079447d216f7ef309ff60abe493cdb6</id>
<content type='text'>
Same as with "clone", users may want to add a submodule to a repository
with a non-default ref storage format. Wire up a new `--ref-format=`
option that works the same as for `git submodule clone`.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/submodule: allow cloning with different ref storage format</title>
<updated>2024-08-08T16:20:49Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-08-08T07:35:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5ac781ad624a32ca4136eae40b4f416b21f0af96'/>
<id>urn:sha1:5ac781ad624a32ca4136eae40b4f416b21f0af96</id>
<content type='text'>
As submodules are proper self-contained repositories, it is perfectly
valid for them to have a different ref storage format than their parent
repository. There is no obvious way for users to ask for the ref storage
format when initializing submodules though. Whether the setup of such
mixed-ref-storage-format constellations is all that useful remains to be
seen. But there is no good reason to not expose such an option, and we
will require it in a subsequent patch.

Introduce a new `--ref-format=` option for git-submodule(1) that allows
the user to pick the ref storage format. This option will also be used
in a subsequent commit, where we start to propagate the same flag from
git-clone(1) to cloning submodules with the `--recursive` switch.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-submodule.sh: break overly long command lines</title>
<updated>2024-08-08T16:20:48Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-08-08T07:35:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d9ab8788e1dbc47968235b33a051e76c735961b0'/>
<id>urn:sha1:d9ab8788e1dbc47968235b33a051e76c735961b0</id>
<content type='text'>
For most of the subcommands of git-submodule(1), we end up passing a
bunch of arguments to the submodule helper. This quickly leads to overly
long lines, where it becomes hard to spot what has changed when one
needs to modify them.

Break up these lines into one argument per line, similarly to how it is
done for the "clone" subcommand already.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
