<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git.c, branch v2.38.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.38.4</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.38.4'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2022-09-01T20:40:18Z</updated>
<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>
<entry>
<title>merge-tree: add option parsing and initial shell for real merge function</title>
<updated>2022-06-22T23:10:05Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2022-06-18T00:20:46Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6ec755a0e152dfb0ed6bffa70b511c45a1f29ebd'/>
<id>urn:sha1:6ec755a0e152dfb0ed6bffa70b511c45a1f29ebd</id>
<content type='text'>
Let merge-tree accept a `--write-tree` parameter for choosing real
merges instead of trivial merges, and accept an optional
`--trivial-merge` option to get the traditional behavior.  Note that
these accept different numbers of arguments, though, so these names
need not actually be used.

Note that real merges differ from trivial merges in that they handle:
  - three way content merges
  - recursive ancestor consolidation
  - renames
  - proper directory/file conflict handling
  - etc.
Basically all the stuff you'd expect from `git merge`, just without
updating the index and working tree.  The initial shell added here does
nothing more than die with "real merges are not yet implemented", but
that will be fixed in subsequent commits.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jh/builtin-fsmonitor-part3'</title>
<updated>2022-06-10T22:04:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-06-10T22:04:14Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=9e496fffc872b20a147d7b80330335edfff919cc'/>
<id>urn:sha1:9e496fffc872b20a147d7b80330335edfff919cc</id>
<content type='text'>
More fsmonitor--daemon.

* jh/builtin-fsmonitor-part3: (30 commits)
  t7527: improve implicit shutdown testing in fsmonitor--daemon
  fsmonitor--daemon: allow --super-prefix argument
  t7527: test Unicode NFC/NFD handling on MacOS
  t/lib-unicode-nfc-nfd: helper prereqs for testing unicode nfc/nfd
  t/helper/hexdump: add helper to print hexdump of stdin
  fsmonitor: on macOS also emit NFC spelling for NFD pathname
  t7527: test FSMonitor on case insensitive+preserving file system
  fsmonitor: never set CE_FSMONITOR_VALID on submodules
  t/perf/p7527: add perf test for builtin FSMonitor
  t7527: FSMonitor tests for directory moves
  fsmonitor: optimize processing of directory events
  fsm-listen-darwin: shutdown daemon if worktree root is moved/renamed
  fsm-health-win32: force shutdown daemon if worktree root moves
  fsm-health-win32: add polling framework to monitor daemon health
  fsmonitor--daemon: stub in health thread
  fsmonitor--daemon: rename listener thread related variables
  fsmonitor--daemon: prepare for adding health thread
  fsmonitor--daemon: cd out of worktree root
  fsm-listen-darwin: ignore FSEvents caused by xattr changes on macOS
  unpack-trees: initialize fsmonitor_has_run_once in o-&gt;result
  ...
</content>
</entry>
<entry>
<title>fsmonitor--daemon: allow --super-prefix argument</title>
<updated>2022-05-26T22:59:28Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2022-05-26T21:47:23Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=53fcfbc84f68d11c9635fe58f72ce5a83200e051'/>
<id>urn:sha1:53fcfbc84f68d11c9635fe58f72ce5a83200e051</id>
<content type='text'>
Create a test in t7527 to verify that we get a stray warning from
`git fsmonitor--daemon start` when indirectly called from
`git submodule absorbgitdirs`.

Update `git fsmonitor--daemon` to take (and ignore) the `--super-prefix`
argument to suppress the warning.

When we have:

1. a submodule with a `sub/.git/` directory (rather than a `sub/.git`
file).

2. `core.fsmonitor` is turned on in the submodule, but the daemon is
not yet started in the submodule.

3. and someone does a `git submodule absorbgitdirs` in the super.

Git will recursively invoke `git submodule--helper absorb-git-dirs`
in the submodule.  This will read the index and may attempt to start
the fsmonitor--daemon with the `--super-prefix` argument.

`git fsmonitor--daemon start` does not accept the `--super-prefix`
argument and causes a warning to be issued.

This does not cause a problem because the `refresh_index()` code
assumes a trivial response if the daemon does not start.

The net-net is a harmelss, but stray warning.  Lets eliminate the
warning.

Signed-off-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'gf/shorthand-version-and-help'</title>
<updated>2022-05-20T22:26:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-05-20T22:26:52Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4976f244f3cd8a9161fdbcc3cfd1ed7b65bb349e'/>
<id>urn:sha1:4976f244f3cd8a9161fdbcc3cfd1ed7b65bb349e</id>
<content type='text'>
"git -v" and "git -h" are now understood as "git --version" and
"git --help".

* gf/shorthand-version-and-help:
  cli: add -v and -h shorthands
</content>
</entry>
<entry>
<title>cli: add -v and -h shorthands</title>
<updated>2022-03-31T22:57:10Z</updated>
<author>
<name>Garrit Franke</name>
<email>garrit@slashdev.space</email>
</author>
<published>2022-03-31T21:27:09Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6b52f48b8f1cda8d428d3e4fe685bd28713f293f'/>
<id>urn:sha1:6b52f48b8f1cda8d428d3e4fe685bd28713f293f</id>
<content type='text'>
Change the behavior of "git -v" to be synonymous with "--version" /
"version", and "git -h" to be synonymous with "--help", but not "help".

These shorthands both display the "unknown option" message. Following
this change, "-v" displays the version, and "-h" displays the help text
of the "git" command.

It should be noted that the "-v" shorthand could be misinterpreted by
the user to mean "verbose" instead of "version", since some sub-commands
make use of it in this context. The top-level "git" command does not
have a "verbose" flag, so it's safe to introduce this shorthand
unambiguously.

Signed-off-by: Garrit Franke &lt;garrit@slashdev.space&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
