From: Jonathan Nieder <jrnieder@gmail.com>
To: Justin Frankel <justin@cockos.com>
Cc: Bert Wesarg <bert.wesarg@googlemail.com>,
git@vger.kernel.org, eyvind.bernhardsen@gmail.com,
Junio C Hamano <gitster@pobox.com>,
Avery Pennarun <apenwarr@gmail.com>
Subject: [PATCH v3 0/4] git-merge: ignore space support
Date: Thu, 26 Aug 2010 00:41:58 -0500 [thread overview]
Message-ID: <20100826054158.GB9708@burratino> (raw)
In-Reply-To: <20100823205915.GA4484@ns1.cockos.com>
Hi,
Justin Frankel wrote:
> git-merge and git-rebase can now be passed -Xignore-space-at-eol,
> -Xignore-space-change, -Xignore-all-space, -Xpatience options.
I've tried this out a little and it seems to do the right thing.
Here's the series in its current state.
Patch 1 is to avoid the code duplication between builtin/merge and
merge-recursive you noticed, by adding a function that recognizes -X
options to merge-recursive.h.
Unlike the trial balloon patch I sent before, it uses a conventional
return value with 0 meaning "recognized" and -1 meaning "not recognized".
Patch 2 replaces the flag parameter to ll_merge with a struct.
I think the maintenance trouble of keeping track of the flag bits is
not worth it for a marginal speedup.
Patches 3 and 4 provide "merge -Xpatience" and
"merge -Xignore-space-change" et al on top of this foundation.
I split them up and put patience first because it is worth thinking
carefully about which version of a line with only whitespace changes
a merge will take.
No tests yet. (If someone would like to add them, that would be
great.) Probably after responding to initial comments I will not have
much time for this series, so please feel free to pick it up and take
it in whatever direction you wish.
Jonathan Nieder (2):
merge-recursive: expose merge options for builtin merge
ll-merge: replace flag argument with options struct
Justin Frankel (2):
merge-recursive --patience
merge-recursive: options to ignore whitespace changes
Documentation/merge-strategies.txt | 22 ++++++++++
Documentation/technical/api-merge.txt | 73 +++++++++++++++++++++++---------
builtin/checkout.c | 2 +-
builtin/merge-recursive.c | 15 +------
builtin/merge.c | 20 +--------
ll-merge.c | 50 +++++++++++++++-------
ll-merge.h | 22 +++-------
merge-file.c | 2 +-
merge-recursive.c | 54 +++++++++++++++++++-----
merge-recursive.h | 3 +
rerere.c | 2 +-
11 files changed, 168 insertions(+), 97 deletions(-)
--
1.7.2.2
next prev parent reply other threads:[~2010-08-26 5:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-23 20:59 [PATCH v2] git-merge: ignore space support Justin Frankel
2010-08-24 2:28 ` Jonathan Nieder
2010-08-24 3:39 ` [RFC/PATCH jn/merge-renormalize] merge-recursive: expose merge options for builtin merge Jonathan Nieder
2010-08-24 18:52 ` Junio C Hamano
2010-08-25 4:29 ` Jonathan Nieder
2010-08-24 4:30 ` [PATCH v2] git-merge: ignore space support Justin Frankel
2010-08-25 4:40 ` Jonathan Nieder
2010-08-25 7:22 ` Bert Wesarg
2010-08-25 15:51 ` Justin Frankel
2010-08-25 17:55 ` Junio C Hamano
2010-08-25 18:21 ` Justin Frankel
2010-08-24 19:01 ` Junio C Hamano
2010-08-24 20:01 ` Bert Wesarg
2010-08-25 3:57 ` Jonathan Nieder
2010-08-26 5:41 ` Jonathan Nieder [this message]
2010-08-26 5:47 ` [PATCH 1/4] merge-recursive: expose merge options for builtin merge Jonathan Nieder
2010-08-26 5:49 ` [PATCH 2/4] ll-merge: replace flag argument with options struct Jonathan Nieder
2010-08-26 16:39 ` Junio C Hamano
2011-01-16 1:08 ` [PATCH v1.7.4-rc2] ll-merge: simplify opts == NULL case Jonathan Nieder
2010-08-26 5:50 ` [PATCH 3/4] merge-recursive --patience Jonathan Nieder
2010-08-26 5:51 ` [PATCH 4/4] merge-recursive: options to ignore whitespace changes Jonathan Nieder
2010-08-26 16:39 ` Junio C Hamano
2010-08-27 8:24 ` Jonathan Nieder
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100826054158.GB9708@burratino \
--to=jrnieder@gmail.com \
--cc=apenwarr@gmail.com \
--cc=bert.wesarg@googlemail.com \
--cc=eyvind.bernhardsen@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=justin@cockos.com \
/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.
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 NNTP newsgroup(s).