git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] [GSoC] Add configuration options for some commonly used command-line options

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 15, 2015, 20:24 UTC
Message-ID
<xmqqlhiyt3fd.fsf@gitster.dls.corp.google.com>
In-Reply-To
<5505DD9D.8010102@posteo.de>
Koosha Khajehmoogahi <koosha@posteo.de> writes:
Show 21 quoted lines
> This patch adds a 'showmerges' config. option for git-log.
> This option determines whether the log should contain merge
> commits or not. In essence, if this option is set to true,
> git-log will be run as 'git-log --no-merges'.
>
> Signed-off-by: Koosha Khajehmoogahi <koosha@posteo.de>
> ---
>  Documentation/config.txt | 3 +++
>  builtin/log.c            | 8 ++++++++
>  2 files changed, 11 insertions(+)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 1530255..7775b8c 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -1735,6 +1735,9 @@ log.showroot::
>  	Tools like linkgit:git-log[1] or linkgit:git-whatchanged[1], which
>  	normally hide the root commit will now show it. True by default.
>  
> +log.showmerges::
> +	If true, merges will be shown in the log list. True by default.

When you have to help your colleague by inspecting the history in her repository, and your colleague has this set to false, and you do want your "git log" to show merge commits, how would you override this setting?

	git log --merges
is not it.

Avoid introducing a configuration that users cannot override it from the command line. If there is a way to override (and for the purpose of this discussion, "git -c log.showmerges=yes" does not count), document it here.

Tests need to make sure that (1) with configuration without command line override, the various settings of the variable give behaviour you wanted to give, and (2) with configuration with command line override, the values set to the variable does not have any effect to the behaviour (i.e. the command line override wins).

Thanks.
Previous: Koosha Khajehmoogahi
Message 3 of 3 in “[GSoC] Add configuration options for some commonly used command-line options”
  1. [GSoC] Add configuration options for some commonly used command-line optionsKoosha Khajehmoogahi, Mar 15, 2015
  2. Koosha KhajehmoogahiMar 15, 2015
  3. Junio C HamanoMar 15, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.