[PATCH v3 0/4] git-merge: ignore space support

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

 



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

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