Skip to content

git-merge: ignore space support

Jonathan Nieder git 1 version In review

Get series with b4
b4 am 20100826054158.GB9708@burratino

Versions newest first

  1. v3 Latest4 patches 3 repliesIn review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4merge-recursive: expose merge options for builtin mergebuiltin/merge-recursive.c builtin/merge.c merge-recursive.c +1 more+26 -310 replies
2/4ll-merge: replace flag argument with options structDocumentation/technical/api-merge.txt builtin/checkout.c ll-merge.c +4 more+105 -662 replies
3/4merge-recursive --patienceDocumentation/merge-strategies.txt builtin/merge-recursive.c ll-merge.c +3 more+14 -00 replies
4/4merge-recursive: options to ignore whitespace changesDocumentation/merge-strategies.txt merge-recursive.c+23 -02 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchJunio C HamanoJustin FrankelBert Wesarg
1/4Helped-by
2/4Helped-by Helped-by
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

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

Hi,

Quoted 2 lines · Justin Frankel

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(-)
Signature · 1 line
1.7.2.2