git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Jeff King <peff@peff.net>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	git-for-windows@googlegroups.com, git@vger.kernel.org,
	git-packagers@googlegroups.com,
	Ariadne Conill <ariadne@dereferenced.org>
Subject: Re: Git for Windows v2.23.0-rc0, was Re: [ANNOUNCE] Git v2.23.0-rc0
Date: Fri, 02 Aug 2019 09:53:55 -0700	[thread overview]
Message-ID: <xmqqblx7ld98.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190802022709.GB54514@google.com> (Jonathan Nieder's message of "Thu, 1 Aug 2019 19:27:09 -0700")

Jonathan Nieder <jrnieder@gmail.com> writes:

> We'll also want to update the docs.  And as Todd suggests, we should
> cover how to disable mailmap in tests.
>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> ---

I avoided the "don't bother initializing use_mailmap_config to
unknown" simplification, but I guess the change is clear enough.

> diff --git i/Documentation/config/log.txt w/Documentation/config/log.txt
> index 7798e10cb0..e9e1e397f3 100644
> --- i/Documentation/config/log.txt
> +++ w/Documentation/config/log.txt
> @@ -41,4 +41,4 @@ log.showSignature::
>  log.mailmap::
>  	If true, makes linkgit:git-log[1], linkgit:git-show[1], and
>  	linkgit:git-whatchanged[1] assume `--use-mailmap`, otherwise
> -	assume `--no-use-mailmap`. False by default.
> +	assume `--no-use-mailmap`. True by default.

Good.  Thanks for being extra careful.

> diff --git i/builtin/log.c w/builtin/log.c
> index 02fa179077..44b10b3415 100644
> --- i/builtin/log.c
> +++ w/builtin/log.c
> @@ -47,7 +47,7 @@ static int default_follow;
>  static int default_show_signature;
>  static int decoration_style;
>  static int decoration_given;
> -static int use_mailmap_config = -1;
> +static int use_mailmap_config = 1;
>  static const char *fmt_patch_subject_prefix = "PATCH";
>  static const char *fmt_pretty;
>  
> @@ -160,7 +160,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
>  			 struct rev_info *rev, struct setup_revision_opt *opt)
>  {
>  	struct userformat_want w;
> -	int quiet = 0, source = 0, mailmap = 0;
> +	int quiet = 0, source = 0, mailmap;
>  	static struct line_opt_callback_data line_cb = {NULL, NULL, STRING_LIST_INIT_DUP};
>  	static struct string_list decorate_refs_exclude = STRING_LIST_INIT_NODUP;
>  	static struct string_list decorate_refs_include = STRING_LIST_INIT_NODUP;
> @@ -204,9 +204,6 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
>  	memset(&w, 0, sizeof(w));
>  	userformat_find_requirements(NULL, &w);
>  
> -	if (mailmap < 0)
> -		mailmap = 1;
> -
>  	if (!rev->show_notes_given && (!rev->pretty_given || w.notes))
>  		rev->show_notes = 1;
>  	if (rev->show_notes)



> diff --git i/t/t4203-mailmap.sh w/t/t4203-mailmap.sh
> index ede0c292af..918ada69eb 100755
> --- i/t/t4203-mailmap.sh
> +++ w/t/t4203-mailmap.sh
> @@ -442,6 +442,34 @@ test_expect_success 'Log output with log.mailmap' '
>  	test_cmp expect actual
>  '
>  
> +test_expect_success 'log.mailmap=false disables mailmap' '
> +	cat >expect <<-\EOF &&
> +	Author: CTO <cto@coompany.xx>
> +	Author: claus <me@company.xx>
> +	Author: santa <me@company.xx>
> +	Author: nick2 <nick2@company.xx>
> +	Author: nick2 <bugs@company.xx>
> +	Author: nick1 <bugs@company.xx>
> +	Author: A U Thor <author@example.com>
> +	EOF
> +	git -c log.mailmap=False log | grep Author > actual &&
> +	test_cmp expect actual
> +'
> +
> +test_expect_success '--no-use-mailmap disables mailmap' '
> +	cat >expect <<-\EOF &&
> +	Author: CTO <cto@coompany.xx>
> +	Author: claus <me@company.xx>
> +	Author: santa <me@company.xx>
> +	Author: nick2 <nick2@company.xx>
> +	Author: nick2 <bugs@company.xx>
> +	Author: nick1 <bugs@company.xx>
> +	Author: A U Thor <author@example.com>
> +	EOF
> +	git log --no-use-mailmap | grep Author > actual &&
> +	test_cmp expect actual
> +'
> +
>  cat >expect <<\EOF
>  Author: Santa Claus <santa.claus@northpole.xx>
>  Author: Santa Claus <santa.claus@northpole.xx>

  reply	other threads:[~2019-08-02 16:54 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29 21:49 Junio C Hamano
2019-07-31 12:43 ` Git for Windows v2.23.0-rc0, was " Johannes Schindelin
2019-07-31 23:18   ` Jeff King
2019-08-01  0:21     ` Jonathan Nieder
2019-08-01  0:37       ` Ariadne Conill
2019-08-01  1:00       ` Jeff King
2019-08-01  1:14         ` Jonathan Nieder
2019-08-01  1:38         ` Ariadne Conill
2019-08-01  2:53           ` Jeff King
2019-08-01  3:21         ` Junio C Hamano
2019-08-01  4:54           ` Ariadne Conill
2019-08-01 21:39             ` Johannes Schindelin
2019-08-01 15:45       ` Junio C Hamano
2019-08-01 16:12         ` Ariadne Conill
2019-08-01 21:36         ` Jeff King
2019-08-01 21:46           ` Junio C Hamano
2019-08-01 21:54             ` Junio C Hamano
2019-08-01 22:18               ` Todd Zullinger
2019-08-02  2:27         ` Jonathan Nieder
2019-08-02 16:53           ` Junio C Hamano [this message]
2019-08-02 18:35             ` Jeff King
2019-08-01  1:04   ` [git-for-windows] " Bryan Turner
2019-08-01 21:40     ` Johannes Schindelin
2019-08-01 14:12 ` [PATCH] RelNotes/2.23.0: fix a few typos and other minor issues Martin Ågren
2019-08-01 15:56   ` Junio C Hamano
2019-08-01 15:57   ` Junio C Hamano
2019-08-01 19:28     ` Martin Ågren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqblx7ld98.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=ariadne@dereferenced.org \
    --cc=git-for-windows@googlegroups.com \
    --cc=git-packagers@googlegroups.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    --subject='Re: Git for Windows v2.23.0-rc0, was Re: [ANNOUNCE] Git v2.23.0-rc0' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git