Re: Bug-ish: CRLF endings and conflict markers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, 11 Jan 2007, Shawn O. Pearce wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote:
> > On Thu, 11 Jan 2007, Shawn O. Pearce wrote:
> > 
> > > That said I don't really care about this problem that much. The problem 
> > > that I care about is its far too easy to convert the lineendings in a 
> > > file (e.g. CRLF->LF, LF->CRLF).  This causes the entire file to differ, 
> > > making merges very difficult.  I really should just fix it (in the one 
> > > place where it matters to me) by modifying the pre-commit hook to look 
> > > for such a case and abort.
> > 
> > Why not just introduce a config variable, and do the conversion in-flight?
> 
> That's a lot of work and goes very much against the Git mindset that
> we never alter content, just store it as-is.

While that is correct, we also _use_ the content, and very much alter it 
all the time. A diff, for example, is nothing but altered content.

> All I want is to make the user realize what they have done.  "Hey dummy, 
> you just changed the entire file and the only difference I see for most 
> lines is simply the addition/removal of a CR.  You shouldn't do that!".  
> The pre-commit hook is the perfect place for that.

This sounds sensible. I mistook your task to be integrator for people you 
can't smack.

> > Or, alternatively, do the merge ignoring white space? (Of course, this 
> > is somewhat pointless when merging whitespace fixes...)
> 
> Lets not go down that road.  That's just asking for trouble. And it 
> sounds like a lot of work from what you pointed out in another message.

But to the contrary, ignoring white space in xdl_merge() is just a 
question of passing XDF_IGNORE_WHITESPACE_CHANGE as part of the xpparam's.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]