Re: [PATCH] xmerge.c: fix xdl_merge to conform with the manual

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

 



Anton Trunov <anton.a.trunov@xxxxxxxxx> writes:

> The git-merge manual says that the ignore-space-change,
> ignore-all-space, ignore-space-at-eol options preserve our version
> if their version only introduces whitespace changes to a line.
>
> So far if there is whitespace-only changes to both sides
> in *all* lines their version will be used.

I am having hard time understanding the last sentence, especially
the "So far" part.  Do you mean "With the current code, if ours and
theirs change whitespaces on all lines, we take theirs"?

I find the description in the documentation is a bit hard to read.

  * If 'their' version only introduces whitespace changes to a line,
    'our' version is used;

  * If 'our' version introduces whitespace changes but 'their'
    version includes a substantial change, 'their' version is used;

  * Otherwise, the merge proceeds in the usual way.

And it is unclear if your reading is correct to me.  In your "So
far" scenario, 'our' version does introduce whitespace changes and
'their' version does quite a bit of damage to the file (after all,
they both change *all* lines, right?).  It does not seem too wrong
to invoke the second clause above and take 'theirs', at least to me.

It is an entirely different matter if the behaviour the document
describes is sane, and I didn't ask "git log" what the reasoning
behind that second point is, but my guess is that a change made by
them being "substantial" is a sign that it is a whitespace cleanup
change and we should take the cleanup in such a case, perhaps?
--
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]