git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Avery Pennarun" <apenwarr@gmail.com>
To: "Nigel Magnay" <nigel.magnay@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: crlf with git-svn driving me nuts...
Date: Wed, 16 Apr 2008 16:03:34 -0400	[thread overview]
Message-ID: <32541b130804161303i74a4dd3bw5ef72105ebf5485b@mail.gmail.com> (raw)
In-Reply-To: <320075ff0804161210m46f3e83bpf7bf9d1d5816d914@mail.gmail.com>

On 4/16/08, Nigel Magnay <nigel.magnay@gmail.com> wrote:
>  Why does it think in this instance that there is a change? It's CRLF
>  in the repo, it's CRLF in the working tree, and the checkout in either
>  mode ought to be identical ??

We got quite confused by this here too.  I'm pretty sure git's
autocrlf feature is buggy, as you've noticed.  Combined with that, svn
has its *own* kind of autocrlf feature (svn:eol-style property on each
file) that acts completely differently.

As an added bonus, I don't know if you've run into this yet, but
cygwin's "patch" command seems to unconditionally strip CR from
patches *before* trying to apply them at all, *even if* the target
file is CRLF, so patches just never apply to CRLF files ever.  Ha ha!

I managed to make the two systems stop stomping on each other, in our
case, by using svn:eol-style of "native" (which means when git-svn
checks out the file, it gets only LF, since it seems to always claim
to be Unix) and not using git's autocrlf at all.  However, this isn't
optimal since then Windows git users end up with LF instead of CRLF in
their files, which confuses them.

On the other hand, the conflicts and the random-newline-changing diffs
go away, as svn fixes things up at checkin time no matter how badly
they got mangled by the windows user (most commonly, they run a
program that resaves the whole file as CRLF).

Obviously a working git autocrlf feature would be better, but I
haven't looked into it closely enough to say where the problem
actually lies.

Have fun,

Avery

      parent reply	other threads:[~2008-04-16 20:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-16 19:10 crlf with git-svn driving me nuts Nigel Magnay
2008-04-16 20:01 ` Dmitry Potapov
2008-04-16 20:20   ` Avery Pennarun
2008-04-16 20:39     ` Dmitry Potapov
2008-04-16 21:56       ` Nigel Magnay
     [not found]       ` <320075ff0804161447u25dfbb2bmcd36ea507224d835@mail.gmail.com>
     [not found]         ` <20080416223739.GJ3133@dpotapov.dyndns.org>
2008-04-16 23:07           ` Nigel Magnay
2008-04-17  0:46             ` Dmitry Potapov
2008-04-17  1:44               ` Avery Pennarun
2008-04-17  7:07               ` Nigel Magnay
2008-04-17  9:43                 ` Dmitry Potapov
2008-04-17 10:09                   ` Nigel Magnay
2008-04-17 18:53                     ` Dmitry Potapov
2008-04-17 22:03                       ` Nigel Magnay
2008-04-17 22:42                         ` Dmitry Potapov
2008-04-17  5:43             ` Steffen Prohaska
2008-04-16 20:56   ` Martin Langhoff
2008-04-16 21:02     ` Avery Pennarun
2008-04-16 21:17     ` Dmitry Potapov
2008-04-16 20:03 ` Avery Pennarun [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=32541b130804161303i74a4dd3bw5ef72105ebf5485b@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=nigel.magnay@gmail.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 public 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).