<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/help.h, branch v2.35.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.35.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.35.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-09-23T17:30:43Z</updated>
<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: do not expect built-in commands to be hardlinked</title>
<updated>2020-10-07T22:25:10Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2020-10-07T21:56:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=722fc374914d4f9b37d42a8eda603eecb790f64c'/>
<id>urn:sha1:722fc374914d4f9b37d42a8eda603eecb790f64c</id>
<content type='text'>
When building with SKIP_DASHED_BUILT_INS=YesPlease, the built-in
commands are no longer present in the `PATH` as hardlinks to `git`.

As a consequence, `load_command_list()` needs to be taught to find the
names of the built-in commands from elsewhere.

This only affected the output of `git --list-cmds=main`, but not the
output of `git help -a` because the latter includes the built-in
commands by virtue of them being listed in command-list.txt.

The bug was detected via a patch series that turns the merge strategies
included in Git into built-in commands: `git merge -s help` relies on
`load_command_list()` to determine the list of available merge
strategies.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help: drop usage of 'common' and 'useful' for guides</title>
<updated>2020-08-05T01:34:01Z</updated>
<author>
<name>Philippe Blain</name>
<email>levraiphilippeblain@gmail.com</email>
</author>
<published>2020-08-05T01:19:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0371a764d2db05e13a87bc1fc16600a1a576e9fe'/>
<id>urn:sha1:0371a764d2db05e13a87bc1fc16600a1a576e9fe</id>
<content type='text'>
Since 1b81d8cb19 (help: use command-list.txt for the source of guides,
2018-05-20), all man5/man7 guides listed in command-list.txt appear in
the output of 'git help -g'.

However, 'git help -g' still prefixes this list with "The common Git
guides are:", which makes one wonder if there are others!

In the same spirit, the man page for 'git help' describes the '--guides'
option as listing 'useful' guides, which is not false per se but can
also be taken to mean that there are other guides that exist but are not
useful.

Instead of 'common' and 'useful', use 'Git concept guides' in both
places. To keep the code in line with this change, rename
help.c::list_common_guides_help to list_guides_help.

Signed-off-by: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bugreport: gather git version and build info</title>
<updated>2020-04-16T22:23:42Z</updated>
<author>
<name>Emily Shaffer</name>
<email>emilyshaffer@google.com</email>
</author>
<published>2020-04-16T21:18:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=617d57195ae844a43486b2e0ad0b7ac36aaddfdd'/>
<id>urn:sha1:617d57195ae844a43486b2e0ad0b7ac36aaddfdd</id>
<content type='text'>
Knowing which version of Git a user has and how it was built allows us
to more precisely pin down the circumstances when a certain issue
occurs, so teach bugreport how to tell us the same output as 'git
version --build-options'.

It's not ideal to directly call 'git version --build-options' because
that output goes to stdout. Instead, wrap the version string in a helper
within help.[ch] library, and call that helper from within the bugreport
library.

Signed-off-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help: move list_config_help to builtin/help</title>
<updated>2020-04-16T22:22:16Z</updated>
<author>
<name>Emily Shaffer</name>
<email>emilyshaffer@google.com</email>
</author>
<published>2020-04-16T21:18:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=709df95b788990472775a63e8b15af3ddd0c822e'/>
<id>urn:sha1:709df95b788990472775a63e8b15af3ddd0c822e</id>
<content type='text'>
Starting in 3ac68a93fd2, help.o began to depend on builtin/branch.o,
builtin/clean.o, and builtin/config.o. This meant that help.o was
unusable outside of the context of the main Git executable.

To make help.o usable by other commands again, move list_config_help()
into builtin/help.c (where it makes sense to assume other builtin libraries
are present).

When command-list.h is included but a member is not used, we start to
hear a compiler warning. Since the config list is generated in a fairly
different way than the command list, and since commands and config
options are semantically different, move the config list into its own
header and move the generator into its own script and build rule.

For reasons explained in 976aaedc (msvc: add a Makefile target to
pre-generate the Visual Studio solution, 2019-07-29), some build
artifacts we consider non-source files cannot be generated in the
Visual Studio environment, and we already have some Makefile tweaks
to help Visual Studio to use generated command-list.h header file.
Do the same to a new generated file, config-list.h, introduced by
this change.

Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
</content>
</entry>
<entry>
<title>help: make help_unknown_ref() NORETURN</title>
<updated>2019-08-30T17:22:42Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2019-08-29T19:13:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=80e3658647561c4a8587978747752f6f63a96717'/>
<id>urn:sha1:80e3658647561c4a8587978747752f6f63a96717</id>
<content type='text'>
Announce that calling help_unknown_ref() exits the program.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>*.[ch]: manually align parameter lists</title>
<updated>2019-05-05T06:20:10Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-04-29T08:28:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad6dad0996f9226b2c3a5a3c725bf2952e52d7e7'/>
<id>urn:sha1:ad6dad0996f9226b2c3a5a3c725bf2952e52d7e7</id>
<content type='text'>
In previous patches, extern was mechanically removed from function
declarations without care to formatting, causing parameter lists to be
misaligned. Manually format changed sections such that the parameter
lists should be realigned.

Viewing this patch with 'git diff -w' should produce no output.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>*.[ch]: remove extern from function declarations using spatch</title>
<updated>2019-05-05T06:20:06Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-04-29T08:28:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=554544276a604c144df45efcb060c80aa322088c'/>
<id>urn:sha1:554544276a604c144df45efcb060c80aa322088c</id>
<content type='text'>
There has been a push to remove extern from function declarations.
Remove some instances of "extern" for function declarations which are
caught by Coccinelle. Note that Coccinelle has some difficulty with
processing functions with `__attribute__` or varargs so some `extern`
declarations are left behind to be dealt with in a future patch.

This was the Coccinelle patch used:

	@@
	type T;
	identifier f;
	@@
	- extern
	  T f(...);

and it was run with:

	$ git ls-files \*.{c,h} |
		grep -v ^compat/ |
		xargs spatch --sp-file contrib/coccinelle/noextern.cocci --in-place

Files under `compat/` are intentionally excluded as some are directly
copied from external sources and we should avoid churning them as much
as possible.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help.h: fix coding style</title>
<updated>2018-12-12T08:18:29Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2018-12-11T14:58:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5acea87c3abfa5316fa27476c02e46eded8b26ae'/>
<id>urn:sha1:5acea87c3abfa5316fa27476c02e46eded8b26ae</id>
<content type='text'>
We want a space after the `while` keyword.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sideband: highlight keywords in remote sideband output</title>
<updated>2018-08-08T22:20:09Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2018-08-07T12:51:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bf1a11f0a100b080a25233980c14b5ae8f3a7d2d'/>
<id>urn:sha1:bf1a11f0a100b080a25233980c14b5ae8f3a7d2d</id>
<content type='text'>
The colorization is controlled with the config setting "color.remote".

Supported keywords are "error", "warning", "hint" and "success". They
are highlighted if they appear at the start of the line, which is
common in error messages, eg.

   ERROR: commit is missing Change-Id

The Git push process itself prints lots of non-actionable messages
(eg. bandwidth statistics, object counters for different phases of the
process). This obscures actionable error messages that servers may
send back. Highlighting keywords in the sideband draws more attention
to those messages.

The background for this change is that Gerrit does server-side
processing to create or update code reviews, and actionable error
messages (eg. missing Change-Id) must be communicated back to the user
during the push. User research has shown that new users have trouble
seeing these messages.

The highlighting is done on the client rather than server side, so
servers don't have to grow capabilities to understand terminal escape
codes and terminal state. It also consistent with the current state
where Git is control of the local display (eg. prefixing messages with
"remote: ").

The highlighting can be configured using color.remote.&lt;KEYWORD&gt;
configuration settings. Since the keys are matched case insensitively,
we match the keywords case insensitively too.

Finally, this solution is backwards compatible: many servers already
prefix their messages with "error", and they will benefit from this
change without requiring a server update. By contrast, a server-side
solution would likely require plumbing the TERM variable through the
git protocol, so it would require changes to both server and client.

Helped-by: Duy Nguyen &lt;pclouds@gmail.com&gt;
Signed-off-by: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
