Re: Git merge improvement - "remove spaces/tabs from beginning of line and end of line"

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

 



On Wed, Aug 11, 2021 at 12:25:10AM +0200, Dušan Červenka | ACRIOS wrote:

> Several times it happened that i added or removed condition in code but a lot 
> of code stayed. Only indention was changed. If there was also other change on 
> some line i had a conflict. And several times it happened that a lot of code 
> was appended instead of replaced (if some line was similar with same 
> indention). This made merging messed and confusing. If we would remove this 
> spaces noise from beginning and end, we could get more acquired merge. What do 
> you think? Of course this is only for looking for most matching lines. At the 
> end the code should keep all necessary spaces.

Have you looked at the whitespace options you can pass to the
merge-recursive strategy?  E.g.:

  git merge -Xignore-space-at-eol some-branch

It may not do quite what you want, though (it sounds like you are more
interested in matching context with whitespace changes than ignoring
spaces on modified lines).

-Peff



[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]

  Powered by Linux