git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Nigel Magnay" <nigel.magnay@gmail.com>
To: "Dmitry Potapov" <dpotapov@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: crlf with git-svn driving me nuts...
Date: Thu, 17 Apr 2008 11:09:12 +0100	[thread overview]
Message-ID: <320075ff0804170309h4232463fk984f362e6cf0a259@mail.gmail.com> (raw)
In-Reply-To: <20080417094342.GM3133@dpotapov.dyndns.org>

>  >
>  > I'm saying it ought to be something like
>  >
>  > isDirty = ( wc.file.mtime > someValue ) && (sha1(repository.file) !=
>  > sha1(wc.file) ) && ( repository.file != filter(wc.file) )
>
>  I don't think it is reasonable. Files inside of the repository and
>  in the work are not meant to be the same. What if I have $Id$ expansion
>  or something else. What could make sense is to add an additional check:
>   && convert_to_work_tree(repository.file) != wc.file
>  but it should be optional, so it will not penalize those who do need
>  or do not want this extra check.
>

Ah, yes - you're right (I was only thinking about check-in filters,
not check-out).

I agree it ought to be optional; I suggest it ought to be turned on
(be default) in the $Id$ expansion and the core.autocrlf=true
scenarios (I.E when there's some filter in place).

>
>  > >  > ...
>  Maybe, you can teach git-svn to be smarter... I mean storing text files
>  in Git repo with CRLF is stupid, so, perhaps, git-svn can do a better
>  job converting CRLF<->LF when it exports and imports from/to SVN.
>

Yar - maybe there's some options there. Maybe it isn't so bad - all
svn projects probably *ought* to be using eol=native, but it isn't
default; so maybe it's just easier to coax those projects into fixing
their svn repos (but of course it's not really an issue for them, so
it might be a bit of a hard sell).

I may add some detail to the wiki docs to point this out - if I'd done
it up front to our local projects, my life would be easier!

>  ...
>  You can use Git and have CRLF in your work tree. You just need to
>  have autocrlf=true for that. _Inside_ of Git, only LF is the end
>  of line. How you store in SVN, it is a separate issue with git-svn.
>  I guess, git-svn needs improvement in this area...
>

Yes, in the sense that git is primarily a *nix tool, so it treats LF
as canon and CRLF as somehow 'stupid' (I.E you could make an equally
valid argument for the reverse position, it just depends on your
perspective ;-)) ; but then again, it's only an issue because I'm now
merging in git *waaay* more often and it's uncovering a problem that
might actually be there already (modulo the fact that svn merging may
ignore line endings anyway - but I don't know because all merges there
seem to inevitably end up in conflicts anyway..).

  reply	other threads:[~2008-04-17 10:10 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 [this message]
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

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=320075ff0804170309h4232463fk984f362e6cf0a259@mail.gmail.com \
    --to=nigel.magnay@gmail.com \
    --cc=dpotapov@gmail.com \
    --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.
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).