From: Jeff King <peff@peff.net>
To: "Dušan Červenka | ACRIOS" <cervenka@acrios.com>
Cc: git@vger.kernel.org
Subject: Re: Git merge improvement - "remove spaces/tabs from beginning of line and end of line"
Date: Wed, 11 Aug 2021 19:12:54 -0400 [thread overview]
Message-ID: <YRRZdmlfBjJTUimj@coredump.intra.peff.net> (raw)
In-Reply-To: <2632907.cDO7J6XS3R@kuhadatko-gl552vw>
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
next prev parent reply other threads:[~2021-08-11 23:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-10 22:25 Git merge improvement - "remove spaces/tabs from beginning of line and end of line" Dušan Červenka | ACRIOS
2021-08-11 23:12 ` Jeff King [this message]
2021-08-13 6:57 ` Dušan Červenka | ACRIOS
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=YRRZdmlfBjJTUimj@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=cervenka@acrios.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).