<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/help.c, branch v2.36.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.36.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.36.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-04-04T17:56:24Z</updated>
<entry>
<title>Merge branch 'jh/builtin-fsmonitor-part2'</title>
<updated>2022-04-04T17:56:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-04-04T17:56:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=439c1e6d5d8ad4d1134fc6ff5e514d28ff9ecac4'/>
<id>urn:sha1:439c1e6d5d8ad4d1134fc6ff5e514d28ff9ecac4</id>
<content type='text'>
Built-in fsmonitor (part 2).

* jh/builtin-fsmonitor-part2: (30 commits)
  t7527: test status with untracked-cache and fsmonitor--daemon
  fsmonitor: force update index after large responses
  fsmonitor--daemon: use a cookie file to sync with file system
  fsmonitor--daemon: periodically truncate list of modified files
  t/perf/p7519: add fsmonitor--daemon test cases
  t/perf/p7519: speed up test on Windows
  t/perf/p7519: fix coding style
  t/helper/test-chmtime: skip directories on Windows
  t/perf: avoid copying builtin fsmonitor files into test repo
  t7527: create test for fsmonitor--daemon
  t/helper/fsmonitor-client: create IPC client to talk to FSMonitor Daemon
  help: include fsmonitor--daemon feature flag in version info
  fsmonitor--daemon: implement handle_client callback
  compat/fsmonitor/fsm-listen-darwin: implement FSEvent listener on MacOS
  compat/fsmonitor/fsm-listen-darwin: add MacOS header files for FSEvent
  compat/fsmonitor/fsm-listen-win32: implement FSMonitor backend on Windows
  fsmonitor--daemon: create token-based changed path cache
  fsmonitor--daemon: define token-ids
  fsmonitor--daemon: add pathname classification
  fsmonitor--daemon: implement 'start' command
  ...
</content>
</entry>
<entry>
<title>help: include fsmonitor--daemon feature flag in version info</title>
<updated>2022-03-25T23:04:16Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2022-03-25T18:03:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dd77cf61a1a2fbf52c94d0cd986d555ad2ba8a4b'/>
<id>urn:sha1:dd77cf61a1a2fbf52c94d0cd986d555ad2ba8a4b</id>
<content type='text'>
Add the "feature: fsmonitor--daemon" message to the output of
`git version --build-options`.

The builtin FSMonitor is only available on certain platforms and
even then only when certain Makefile flags are enabled, so print
a message in the verbose version output when it is available.

This can be used by test scripts for prereq testing.  Granted, tests
could just try `git fsmonitor--daemon status` and look for a 128 exit
code or grep for a "not supported" message on stderr, but these
methods are rather obscure.

The main advantage is that the feature message will automatically
appear in bug reports and other support requests.

This concept was also used during the development of Scalar for
similar reasons.

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>help: don't print "\n" before single-section output</title>
<updated>2022-02-23T21:41:37Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-02-21T19:38:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=93de1b6999898079f521afd73d6a4ae9d5f9aaea'/>
<id>urn:sha1:93de1b6999898079f521afd73d6a4ae9d5f9aaea</id>
<content type='text'>
Fix a formatting regression in 1b81d8cb19d (help: use command-list.txt
for the source of guides, 2018-05-20). Adjust the output of "git help
--guides" and any other future single-section commands so that a
newline isn't inserted before the only section being printed.

This changes the output from:

    $ git help --guides

    The Git concept guides are:
    [...]

To:

    $ git help --guides
    The Git concept guides are:
    [...]

That we started printing an extra "\n" in 1b81d8cb19d wasn't intended,
but an emergent effect of moving all of the printing of "git help"
output to code that was ready to handle printing N sections.

With 1b81d8cb19d we started using the "print_cmd_by_category()"
function added earlier in the same series, or in cfb22a02ab5 (help:
use command-list.h for common command list, 2018-05-10).

Fixing this formatting nit is easy enough. Let's have all of the
output that would like to be "\n"-separated from other lines emit its
own "\n". We then adjust "print_cmd_by_category()" to only print a
"\n" to delimit the sections it's printing out.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help: add --no-[external-commands|aliases] for use with --all</title>
<updated>2022-02-23T21:41:37Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-02-21T19:38:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1ce590133b545aa735683f46003d12df624d67af'/>
<id>urn:sha1:1ce590133b545aa735683f46003d12df624d67af</id>
<content type='text'>
Add the ability to only emit git's own usage information under
--all. This also allows us to extend the "test_section_spacing" tests
added in a preceding commit to test "git help --all"
output.

Previously we could not do that, as the tests might find a git-*
command in the "$PATH", which would make the output differ from one
setup to another.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help.c: split up list_all_cmds_help() function</title>
<updated>2022-02-23T21:41:36Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-02-21T19:38:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6fb427abbb06236546c0d5b873e580b0a6fdb414'/>
<id>urn:sha1:6fb427abbb06236546c0d5b873e580b0a6fdb414</id>
<content type='text'>
Split up the listing of commands and aliases from
list_all_cmds_help(). This will make a subsequent functional change
smaller.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help.c: use puts() instead of printf{,_ln}() for consistency</title>
<updated>2022-02-23T21:41:36Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-02-21T19:38:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cd87ce7d0def6b6efeb1ae688bde217a0a47c9eb'/>
<id>urn:sha1:cd87ce7d0def6b6efeb1ae688bde217a0a47c9eb</id>
<content type='text'>
Change code in "help.c" that used printf_ln() without format
specifiers to use puts() instead, as other existing code in the file
does. Let's also change related code to use puts() instead of the
equivalent of calling "printf" with a "%s\n" format.

This formatting-only change will make a subsequent functional change
easier to read, as it'll be changing code that's consistently using
the same functions to do the same things.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help: make auto-correction prompt more consistent</title>
<updated>2021-12-16T21:49:39Z</updated>
<author>
<name>Kashav Madan</name>
<email>kshvmdn@gmail.com</email>
</author>
<published>2021-12-15T22:58:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0fc8ed154cd9f110e8234cd54aa9324182978d26'/>
<id>urn:sha1:0fc8ed154cd9f110e8234cd54aa9324182978d26</id>
<content type='text'>
There are three callsites of git_prompt() helper function that ask a
"yes/no" question to the end user, but one of them in help.c that
asks if the suggested auto-correction is OK, which is given when the
user makes a possible typo in a Git subcommand name, is formatted
differently from the others.

Update the format string to make the prompt string look more
consistent.

Signed-off-by: Kashav Madan &lt;kshvmdn@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help: move column config discovery to help.c library</title>
<updated>2021-09-23T17:30:43Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-09-21T22:40:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=06fa4db3f7e450deb0bb849b338d7a5453f0d183'/>
<id>urn:sha1:06fa4db3f7e450deb0bb849b338d7a5453f0d183</id>
<content type='text'>
When a git_config() call was added in dbfae689690 (help: reuse
print_columns() for help -a, 2012-04-13) to read the column config
we'd always use the resulting "colopts" variable.

Then in 63eae83f8f3 (help: add "-a --verbose" to list all commands
with synopsis, 2018-05-20) we started only using the "colopts" config
under "--all" if "--no-verbose" was also given, but the "git_config()"
call was not moved inside the "verbose" branch of the code.

This change effectively does that, we'll only call list_commands()
under "--all --no-verbose", so let's have it look up the config it
needs. See 26c7d067832 (help -a: improve and make --verbose default, 2018-09-29) for another case in help.c where we look up config.

The get_colopts() function is named for consistency with the existing
get_alias() function added in 26c7d067832.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help.c: help.autocorrect=prompt waits for user action</title>
<updated>2021-08-14T18:20:49Z</updated>
<author>
<name>Azeem Bande-Ali</name>
<email>me@azeemba.com</email>
</author>
<published>2021-08-14T05:11:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dc66e3c799cd5d8f3e664e26899bca200ffdfd7b'/>
<id>urn:sha1:dc66e3c799cd5d8f3e664e26899bca200ffdfd7b</id>
<content type='text'>
If help.autocorrect is set to 'prompt', the user is prompted
before the suggested action is executed.

Based on original patch by David Barr
https://lore.kernel.org/git/1283758030-13345-1-git-send-email-david.barr@cordelta.com/

Signed-off-by: Azeem Bande-Ali &lt;me@azeemba.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help.c: help.autocorrect=never means "do not compute suggestions"</title>
<updated>2020-11-25T21:02:15Z</updated>
<author>
<name>Drew DeVault</name>
<email>sir@cmpwn.com</email>
</author>
<published>2020-11-25T21:01:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=644bb953ce3251f2868ece6b767949828fa32e44'/>
<id>urn:sha1:644bb953ce3251f2868ece6b767949828fa32e44</id>
<content type='text'>
While help.autocorrect can be set to 0 to decline auto-execution of
possibly mistyped commands, it still spends cycles to compute the
suggestions, and it wastes screen real estate.

Update help.autocorrect to accept the string "never" to just exit
with error upon mistyped commands to help users who prefer to never
see suggested corrections at all.

While at it, introduce "immediate" as a more readable way to
immediately execute the auto-corrected command, which can be done
with negative value.

Signed-off-by: Drew DeVault &lt;sir@cmpwn.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
