git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: Yann Droneaud <ydroneaud@opteya.com>, git@vger.kernel.org
Subject: Re: git diff returns fatal error with core.safecrlf is set to true.
Date: Wed, 26 Jun 2013 08:48:53 -0700	[thread overview]
Message-ID: <7vsj04yisa.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <51C9FDC0.5020709@web.de>

Torsten Bögershausen <tboegi@web.de> writes:

>> +++ b/diff.c
>> @@ -2647,6 +2647,10 @@ static int diff_populate_gitlink(struct diff_filespec *s, int size_only)
>>  int diff_populate_filespec(struct diff_filespec *s, int size_only)
>>  {
>>  	int err = 0;
>> +	enum safe_crlf crlf_warn = (safe_crlf != SAFE_CRLF_FAIL
>> +				    ? safe_crlf
>> +				    : SAFE_CRLF_WARN);
>
> Thanks, 
> Does it makes sense to write it the other way around?
>
> enum safe_crlf crlf_warn = (safe_crlf == SAFE_CRLF_FAIL 
>                            ? SAFE_CRLF_WARN 
>                            : safe_crlf);

I didn't see much difference either way, but between "FAIL needs to
be demoted to WARN, everything else goes as-is" and the original "We
do not care about anything other than FAIL, so use it as-is, but
demote FAIL to WARN", yours look shorter.  Will replace.

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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-21 13:26 Yann Droneaud
2013-06-21 15:44 ` Junio C Hamano
2013-06-21 21:57   ` Junio C Hamano
2013-06-24 12:42     ` Yann Droneaud
2013-06-24 18:19       ` Junio C Hamano
2013-06-24 21:48         ` Junio C Hamano
2013-06-25 20:29           ` Torsten Bögershausen
2013-06-26 15:48             ` Junio C Hamano [this message]

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=7vsj04yisa.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=tboegi@web.de \
    --cc=ydroneaud@opteya.com \
    /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.
Code repositories for project(s) associated with this inbox:

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).