All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	Finn Arne Gangstad <finnag@pvv.org>,
	"git@vger.kernel.org List" <git@vger.kernel.org>
Subject: Re: [PATCH v3 3/3] Don't expand CRLFs when normalizing text during merge
Date: Fri, 25 Jun 2010 10:58:54 +0200	[thread overview]
Message-ID: <EE9F4F92-06D5-4B31-BF6F-1163774C112B@gmail.com> (raw)
In-Reply-To: <4C246622.9090707@viscovery.net>

On 25. juni 2010, at 10.17, Johannes Sixt wrote:

> Am 6/25/2010 9:58, schrieb Eyvind Bernhardsen:
>> Sorry, I didn't explain that very well.  I noticed that normalize_buffer()
>> does more work when core.eol=crlf than it does when core.eol=lf:
>> _to_working_tree() converts LF to CRLF, and then _to_git() reverses that
>> conversion.  This patch makes normalization act the same way when
>> core.eol=crlf as it does when core.eol=lf.
> 
> Got it: I missed that you are omitting the conversion only on the "way
> out" but not on the "way back".
> 
> Looking more closely at your patch, I think that you should make this
> optimization only if you can prove that the subsequent apply_filter() is a
> no-op. Otherwise, you may break a smudge filter that expects CRLFs.

Such a smudge filter would break when core.eol=lf, but you're suggesting that someone might be using a picky smudge filter and has set core.eol=crlf to make sure it gets the line endings it expects?

That's a very good catch.  I'll add a test so that the optimization is only done if filter is NULL.
-- 
Eyvind Bernhardsen

  reply	other threads:[~2010-06-25  8:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-24 20:44 [PATCH v3 0/3] Help merging when text has been normalized Eyvind Bernhardsen
2010-06-24 20:44 ` [PATCH v3 1/3] Avoid conflicts when merging branches with mixed normalization Eyvind Bernhardsen
2010-06-24 20:44 ` [PATCH v3 2/3] Try normalizing files to avoid delete/modify conflicts when merging Eyvind Bernhardsen
2010-06-24 20:44 ` [PATCH v3 3/3] Don't expand CRLFs when normalizing text during merge Eyvind Bernhardsen
2010-06-25  5:45   ` Johannes Sixt
2010-06-25  7:58     ` Eyvind Bernhardsen
2010-06-25  8:17       ` Johannes Sixt
2010-06-25  8:58         ` Eyvind Bernhardsen [this message]
2010-06-25  8:00     ` Finn Arne Gangstad

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=EE9F4F92-06D5-4B31-BF6F-1163774C112B@gmail.com \
    --to=eyvind.bernhardsen@gmail.com \
    --cc=finnag@pvv.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    /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.