<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git.c, branch v2.39.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.39.2</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.39.2'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2022-11-23T02:22:22Z</updated>
<entry>
<title>Merge branch 'ab/submodule-helper-prep-only'</title>
<updated>2022-11-23T02:22:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-11-23T02:22:22Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=1107a3963b566e41d25ee1a7e152db9b08a8fc6e'/>
<id>urn:sha1:1107a3963b566e41d25ee1a7e152db9b08a8fc6e</id>
<content type='text'>
Preparation to remove git-submodule.sh and replace it with a builtin.

* ab/submodule-helper-prep-only:
  submodule--helper: use OPT_SUBCOMMAND() API
  submodule--helper: drop "update --prefix &lt;pfx&gt;" for "-C &lt;pfx&gt; update"
  submodule--helper: remove --prefix from "absorbgitdirs"
  submodule API &amp; "absorbgitdirs": remove "----recursive" option
  submodule.c: refactor recursive block out of absorb function
  submodule tests: test for a "foreach" blind-spot
  submodule--helper: fix a memory leak in "status"
  submodule tests: add tests for top-level flag output
  submodule--helper: move "config" to a test-tool
</content>
</entry>
<entry>
<title>submodule--helper: use OPT_SUBCOMMAND() API</title>
<updated>2022-11-08T19:55:30Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-11-08T14:10:40Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=69d94464e14de859ff56bcde7ebe0132201eceb9'/>
<id>urn:sha1:69d94464e14de859ff56bcde7ebe0132201eceb9</id>
<content type='text'>
Have the cmd_submodule__helper() use the OPT_SUBCOMMAND() API
introduced in fa83cc834da (parse-options: add support for parsing
subcommands, 2022-08-19).

This is only a marginal reduction in line count, but once we start
unifying this with a yet-to-be-added "builtin/submodule.c" it'll be
much easier to reason about those changes, as they'll both use
OPT_SUBCOMMAND().

We don't need to worry about "argv[0]" being NULL in the die() because
we'd have errored out in parse_options() as we're not using
"PARSE_OPT_SUBCOMMAND_OPTIONAL".

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>use child_process members "args" and "env" directly</title>
<updated>2022-10-30T18:04:40Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-10-30T11:51:14Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=0e90673957f12adc1a84b13d3dfff02151e4a7a8'/>
<id>urn:sha1:0e90673957f12adc1a84b13d3dfff02151e4a7a8</id>
<content type='text'>
Build argument list and environment of child processes by using
struct child_process and populating its members "args" and "env"
directly instead of maintaining separate strvecs and letting
run_command_v_opt() and friends populate these members.  This is
simpler, shorter and slightly more efficient.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ds/cmd-main-reorder'</title>
<updated>2022-10-21T18:37:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-10-21T18:37:28Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=1f20aa22d7bdb4fb1132f703620a8a2ddeee1162'/>
<id>urn:sha1:1f20aa22d7bdb4fb1132f703620a8a2ddeee1162</id>
<content type='text'>
Code clean-up.

* ds/cmd-main-reorder:
  git.c: improve code readability in cmd_main()
</content>
</entry>
<entry>
<title>git.c: improve code readability in cmd_main()</title>
<updated>2022-10-09T05:11:37Z</updated>
<author>
<name>Daniel Sonbolian</name>
<email>dsal3389@gmail.com</email>
</author>
<published>2022-10-08T16:21:37Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=413bc6d20ad4d686f68afcf3c012b77840c1243b'/>
<id>urn:sha1:413bc6d20ad4d686f68afcf3c012b77840c1243b</id>
<content type='text'>
Check for an error condition whose body unconditionally exists
first, and then perform the special casing of "version" and "help"
as part of the preparation for the "normal codepath".  This makes
the code simpler to read.

Signed-off-by: Daniel Sonbolian &lt;dsal3389@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sg/parse-options-subcommand'</title>
<updated>2022-09-01T20:40:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-09-01T20:40:18Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=d528044c83cc1f5fb925fbb043110f5fb0382f99'/>
<id>urn:sha1:d528044c83cc1f5fb925fbb043110f5fb0382f99</id>
<content type='text'>
Introduce the "subcommand" mode to parse-options API and update the
command line parser of Git commands with subcommands.

* sg/parse-options-subcommand: (23 commits)
  remote: run "remote rm" argv through parse_options()
  maintenance: add parse-options boilerplate for subcommands
  pass subcommand "prefix" arguments to parse_options()
  builtin/worktree.c: let parse-options parse subcommands
  builtin/stash.c: let parse-options parse subcommands
  builtin/sparse-checkout.c: let parse-options parse subcommands
  builtin/remote.c: let parse-options parse subcommands
  builtin/reflog.c: let parse-options parse subcommands
  builtin/notes.c: let parse-options parse subcommands
  builtin/multi-pack-index.c: let parse-options parse subcommands
  builtin/hook.c: let parse-options parse subcommands
  builtin/gc.c: let parse-options parse 'git maintenance's subcommands
  builtin/commit-graph.c: let parse-options parse subcommands
  builtin/bundle.c: let parse-options parse subcommands
  parse-options: add support for parsing subcommands
  parse-options: drop leading space from '--git-completion-helper' output
  parse-options: clarify the limitations of PARSE_OPT_NODASH
  parse-options: PARSE_OPT_KEEP_UNKNOWN only applies to --options
  api-parse-options.txt: fix description of OPT_CMDMODE
  t0040-parse-options: test parse_options() with various 'parse_opt_flags'
  ...
</content>
</entry>
<entry>
<title>builtin/worktree.c: let parse-options parse subcommands</title>
<updated>2022-08-19T18:13:16Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2022-08-19T16:04:11Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=398c4ff582646b099eb1f3b14a525dfe5eeb5420'/>
<id>urn:sha1:398c4ff582646b099eb1f3b14a525dfe5eeb5420</id>
<content type='text'>
'git worktree' parses its subcommands with a long list of if
statements.  parse-options has just learned to parse subcommands, so
let's use that facility instead, with the benefits of shorter code,
handling missing or unknown subcommands, and listing subcommands for
Bash completion.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/gc.c: let parse-options parse 'git maintenance's subcommands</title>
<updated>2022-08-19T18:13:15Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2022-08-19T16:04:03Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=0350954482bca6accd7b4ad072a1bdb83651b376'/>
<id>urn:sha1:0350954482bca6accd7b4ad072a1bdb83651b376</id>
<content type='text'>
'git maintenanze' parses its subcommands with a couple of if
statements.  parse-options has just learned to parse subcommands, so
let's use that facility instead, with the benefits of shorter code,
handling missing or unknown subcommands, and listing subcommands for
Bash completion.

This change makes 'git maintenance' consistent with other commands in
that the help text shown for '-h' goes to standard output, not error,
in the exit code and error message on unknown subcommand, and the
error message on missing subcommand.  There is a test checking these,
which is now updated accordingly.

Note that some of the functions implementing each subcommand don't
accept any parameters, so add the (unused) 'argc', '**argv' and
'*prefix' parameters to make them match the type expected by
parse-options, and thus avoid casting function pointers.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git.c: update NO_PARSEOPT markings</title>
<updated>2022-08-19T18:13:13Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2022-08-19T16:03:52Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=66fa6e8ed8bcfff6708d7bceed4c2b9e4050ebe7'/>
<id>urn:sha1:66fa6e8ed8bcfff6708d7bceed4c2b9e4050ebe7</id>
<content type='text'>
Our Bash completion script can complete --options for commands using
parse-options even when that command doesn't have a dedicated
completion function, but to do so the completion script must know
which commands use parse-options and which don't.  Therefore, commands
not using parse-options are marked in 'git.c's command list with the
NO_PARSEOPT flag.

Update this list, and remove this flag from the commands that by now
use parse-options.

After this change we can TAB complete --options of the plumbing
commands 'commit-tree', 'mailinfo' and 'mktag'.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/diagnose.c: create 'git diagnose' builtin</title>
<updated>2022-08-12T20:20:02Z</updated>
<author>
<name>Victoria Dye</name>
<email>vdye@github.com</email>
</author>
<published>2022-08-12T20:10:15Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6783fd3cef0d6625e8a6d9d42d76042447078401'/>
<id>urn:sha1:6783fd3cef0d6625e8a6d9d42d76042447078401</id>
<content type='text'>
Create a 'git diagnose' builtin to generate a standalone zip archive of
repository diagnostics.

The "diagnose" functionality was originally implemented for Scalar in
aa5c79a331 (scalar: implement `scalar diagnose`, 2022-05-28). However, the
diagnostics gathered are not specific to Scalar-cloned repositories and
can be useful when diagnosing issues in any Git repository.

Helped-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Helped-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Victoria Dye &lt;vdye@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
