All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Anthony Sottile <asottile@umich.edu>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] config.c: fix regression for core.safecrlf false
Date: Wed, 6 Jun 2018 17:53:09 +0200	[thread overview]
Message-ID: <20180606155309.GA5624@atze2.lan> (raw)
In-Reply-To: <20180604201742.18992-1-asottile@umich.edu>

On Mon, Jun 04, 2018 at 01:17:42PM -0700, Anthony Sottile wrote:
> A regression introduced in 8462ff43e42ab67cecd16fdfb59451a53cc8a945 caused
> autocrlf rewrites to produce a warning message despite setting safecrlf=false.
> 
> Signed-off-by: Anthony Sottile <asottile@umich.edu>
> ---
>  config.c        |  2 +-
>  t/t0020-crlf.sh | 10 ++++++++++
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/config.c b/config.c
> index fbbf0f8..de24e90 100644
> --- a/config.c
> +++ b/config.c
> @@ -1233,7 +1233,7 @@ static int git_default_core_config(const char *var, const char *value)
>  		}
>  		eol_rndtrp_die = git_config_bool(var, value);
>  		global_conv_flags_eol = eol_rndtrp_die ?
> -			CONV_EOL_RNDTRP_DIE : CONV_EOL_RNDTRP_WARN;
> +			CONV_EOL_RNDTRP_DIE : 0;
>  		return 0;
>  	}
>  
> diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
> index 71350e0..5f05698 100755
> --- a/t/t0020-crlf.sh
> +++ b/t/t0020-crlf.sh
> @@ -98,6 +98,16 @@ test_expect_success 'safecrlf: git diff demotes safecrlf=true to warn' '
>  '
>  
>  
> +test_expect_success 'safecrlf: no warning with safecrlf=false' '
> +	git config core.autocrlf input &&
> +	git config core.safecrlf false &&
> +
> +	for w in I am all CRLF; do echo $w; done | append_cr >allcrlf &&
> +	git add allcrlf 2>err &&
> +	test_must_be_empty err
> +'
> +
> +
>  test_expect_success 'switch off autocrlf, safecrlf, reset HEAD' '
>  	git config core.autocrlf false &&
>  	git config core.safecrlf false &&
> -- 
> 2.7.4
> 

Looks good to me, thanks for cleaning my mess.

Acked-By: Torsten Bögershausen <tboegi@web.de>

  reply	other threads:[~2018-06-06 15:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04 20:17 [PATCH] config.c: fix regression for core.safecrlf false Anthony Sottile
2018-06-06 15:53 ` Torsten Bögershausen [this message]
2018-06-06 17:15 ` Eric Sunshine
2018-06-06 17:17   ` Eric Sunshine
2018-06-06 17:18     ` Anthony Sottile
2018-06-06 17:22       ` Eric Sunshine
2018-06-12  1:46         ` Anthony Sottile
2018-06-12  4:34           ` Eric Sunshine
2018-06-13  1:19           ` Torsten Bögershausen

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

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

  git send-email \
    --in-reply-to=20180606155309.GA5624@atze2.lan \
    --to=tboegi@web.de \
    --cc=asottile@umich.edu \
    --cc=git@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.