* [PATCH 0/2] git-merge: ignore space support
@ 2010-08-22 5:43 Justin Frankel
2010-08-23 19:33 ` Jonathan Nieder
0 siblings, 1 reply; 3+ messages in thread
From: Justin Frankel @ 2010-08-22 5:43 UTC (permalink / raw
To: git
Hello,
(Sorry if this is a duplicate, I'm thinking my MIME encoding was causing this
to get filtered).
I've added support for merging with ignoring line endings (specifically
--ignore-space-at-eol) when using recursive merging. I've added this as a
strategy-option, so that you can do:
git merge --strategy-option=ignore-space-at-eol <branch>
and
git rebase --strategy-option=ignore-space-at-eol <branch>
The only option I needed was ignore-space-at-eol, however it made some sense (to
me at least) to include the other xdiff options (ignore-space-change,
ignore-all-space, patient).
I researched why this wasn't supported already, and only found some vague
references to why it shouldn't be in there -- if so, I would like to hear that
explanation (it does seem to me like it should be a good thing to support, even
if you strongly discourage use of it -- it would have saved me many hours
yesterday had it been available, but that of course isn't git's fault, but
Xcode's. ).
Which branches should we derive from for things like this? The first patch is
for master, the second for next (there were enough changes in ll-merge that
the implementations are a bit different).
Thank you for your time, and I'm very happy to be using Git! It is wonderful.
Cheers,
Justin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 0/2] git-merge: ignore space support
2010-08-22 5:43 [PATCH 0/2] git-merge: ignore space support Justin Frankel
@ 2010-08-23 19:33 ` Jonathan Nieder
2010-08-23 20:34 ` Justin Frankel
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Nieder @ 2010-08-23 19:33 UTC (permalink / raw
To: Justin Frankel; +Cc: git, Eyvind Bernhardsen
(+cc: Eyvind Bernhardsen, resident scholar on LF/CRLF conflicts)
Hi!
Justin Frankel wrote:
> I've added support for merging with ignoring line endings (specifically
> --ignore-space-at-eol) when using recursive merging. I've added this as a
> strategy-option, so that you can do:
>
> git merge --strategy-option=ignore-space-at-eol <branch>
>
> and
>
> git rebase --strategy-option=ignore-space-at-eol <branch>
>
> The only option I needed was ignore-space-at-eol, however it made some sense (to
> me at least) to include the other xdiff options (ignore-space-change,
> ignore-all-space, patient).
Interesting. The idea seems sane, provided it copes with edge cases
well (haven't checked the code yet).
I have even wished for a "merge -Xpatience" from time to time.
> Which branches should we derive from for things like this? The first patch is
> for master, the second for next (there were enough changes in ll-merge that
> the implementations are a bit different).
See Documentation/SubmittingPatches, section labelled "Decide what to
base your work on".
Generally the rule is to develop features against "master", or on top
of a relevant topic branch from "next" or "pu" if your implementation
requires features from it (or if it is likely to create heavy
conflicts).
If the patches seem sane, is it all right if we forge your sign-off? (See
Documentation/SubmittingPatches for what this means.)
Since the threading does not seem to have worked correctly, here are
the patches, for reference.
for master: http://thread.gmane.org/gmane.comp.version-control.git/154166
for next: http://thread.gmane.org/gmane.comp.version-control.git/154167
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 0/2] git-merge: ignore space support
2010-08-23 19:33 ` Jonathan Nieder
@ 2010-08-23 20:34 ` Justin Frankel
0 siblings, 0 replies; 3+ messages in thread
From: Justin Frankel @ 2010-08-23 20:34 UTC (permalink / raw
To: Jonathan Nieder; +Cc: git, Eyvind Bernhardsen
Jonathan Nieder wrote:
> (+cc: Eyvind Bernhardsen, resident scholar on LF/CRLF conflicts)
>
> Hi!
>
> Justin Frankel wrote:
>
>
>> I've added support for merging with ignoring line endings (specifically
>> --ignore-space-at-eol) when using recursive merging. I've added this as a
>> strategy-option, so that you can do:
>>
>> git merge --strategy-option=ignore-space-at-eol <branch>
>>
>> and
>>
>> git rebase --strategy-option=ignore-space-at-eol <branch>
>>
>> The only option I needed was ignore-space-at-eol, however it made some sense (to
>> me at least) to include the other xdiff options (ignore-space-change,
>> ignore-all-space, patient).
>>
>
> Interesting. The idea seems sane, provided it copes with edge cases
> well (haven't checked the code yet).
>
> I have even wished for a "merge -Xpatience" from time to time.
>
>
I've mostly used it for dealing with a bunch of mixed-line-ending files
(Xcode 3.1 has a nasty habit of converting all CRLFs to LFs, and VC6
tends to just use CRLFs for inserted lines). For my tests it has worked
very well. I'm not completely sure of the implications -- if you start
merging code with various line endings, you probably end up with an
annoying mix of them, forcing you to use -Xignore-space-at-eol for all
future merges on those files.. So it is probably worth discouraging use
of this, but is also a lifesaver if you have existing code that is messy.
>> Which branches should we derive from for things like this? The first patch is
>> for master, the second for next (there were enough changes in ll-merge that
>> the implementations are a bit different).
>>
>
> See Documentation/SubmittingPatches, section labelled "Decide what to
> base your work on".
>
> Generally the rule is to develop features against "master", or on top
> of a relevant topic branch from "next" or "pu" if your implementation
> requires features from it (or if it is likely to create heavy
> conflicts).
>
> If the patches seem sane, is it all right if we forge your sign-off? (See
> Documentation/SubmittingPatches for what this means.)
>
> Since the threading does not seem to have worked correctly, here are
> the patches, for reference.
>
> for master: http://thread.gmane.org/gmane.comp.version-control.git/154166
> for next: http://thread.gmane.org/gmane.comp.version-control.git/154167
>
>
Thank you for pointing to me to this file (I had looked a bunch of
places on the web but didn't think to look at the Documentation, shame
on me). If you like I can clean up some stuff I did wrong (including the
commit messages, as well as it appears some of my lines have indentation
with spaces instead of tabs), and sign-off and resend.
Thank you again for the explanation and help, I very much appreciate
your time.
-Justin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-23 20:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-22 5:43 [PATCH 0/2] git-merge: ignore space support Justin Frankel
2010-08-23 19:33 ` Jonathan Nieder
2010-08-23 20:34 ` Justin Frankel
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).