From: Charles Bailey <charles@hashpling.org>
To: Hannu Koivisto <azure@iki.fi>
Cc: git@vger.kernel.org
Subject: Re: git diff, git mergetool and CRLF conversion
Date: Wed, 21 Jan 2009 17:23:51 +0000 [thread overview]
Message-ID: <20090121172351.GB21727@hashpling.org> (raw)
In-Reply-To: <83k58ofvjt.fsf@kalahari.s2.org>
On Wed, Jan 21, 2009 at 06:55:34PM +0200, Hannu Koivisto wrote:
> Hi,
>
> Suppose I have core.autocrlf set to true and and due to that a
> version controlled file in a working tree with CRLF line endings.
> If I modify such a file and then say "git diff", I get a patch with
> LF line endings.
>
> Also, if get a merge conflict with a file to which CRLF conversion
> is applied and run e.g. "git mergetool -t emerge", the temporary
> files representing stage2 and stage3 versions seem to have LF line
> endings.
>
> Is this intended behaviour? I'm using 1.6.1 on Cygwin.
Speaking for mergetool, I believe that it's simply because mergetool
uses git cat-file which just outputs the raw contents of a blob and
doesn't do any line ending conversion.
IMHO, I think that it should probably perform the 'convert to working
tree format' change when preparing the temporary files. I'm not sure
how best to do that, but perhaps it should be using git checkout-index
with the --temp option instead of cat-file.
--
Charles Bailey
http://ccgi.hashpling.plus.com/blog/
next prev parent reply other threads:[~2009-01-21 17:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-21 16:55 git diff, git mergetool and CRLF conversion Hannu Koivisto
2009-01-21 17:23 ` Charles Bailey [this message]
2009-01-21 21:03 ` Theodore Tso
2009-01-21 22:57 ` [PATCH] mergetool: respect autocrlf by using checkout-index Charles Bailey
2009-01-23 17:20 ` Junio C Hamano
2009-01-23 18:18 ` Charles Bailey
2009-01-26 16:15 ` Hannu Koivisto
2009-01-26 16:31 ` Charles Bailey
2009-01-26 21:28 ` Junio C Hamano
2009-01-26 22:08 ` Junio C Hamano
2009-01-26 23:09 ` Junio C Hamano
2009-01-27 13:58 ` Hannu Koivisto
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=20090121172351.GB21727@hashpling.org \
--to=charles@hashpling.org \
--cc=azure@iki.fi \
--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 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 NNTP newsgroup(s).