Skip to content

Move call_depth and index_only to struct merge_options

Miklos Vajna git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2merge-recursive: move call_depth to struct merge_optionsmerge-recursive.c merge-recursive.h+13 -133 replies
1/2merge-recursive: move current_{file,directory}_set to struct merge_optionsmerge-recursive.c merge-recursive.h+33 -270 replies
2/2merge-recursive: move index_only to struct merge_optionsmerge-recursive.c merge-recursive.h+80 -710 replies
2/2merge-recursive: move make_virtual_commit()'s virtual_id to merge_optionsmerge-recursive.c merge-recursive.h+15 -102 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Move call_depth and index_only to struct merge_options
Quoted 3 lines · Junio C Hamano

I found it a bit disturbing that "index_only" and "call_depth" were not
part of merge_options structure.

Here are two patches to do it, on top of current mv/merge-recursive.

Both patches are pretty trivial, I think, but I split them as the second one is larger.

Now in some cases we have function calls like

merge_file(o, one, a, b, o->branch1, o->branch2);

but I don't think we can avoid it, as the last two parameters are not always like this (two times are like this, and once conditionally swapped). I'm not sure if it worth to introduce a new "int swap" parameter, just to avoid the last two one.

Miklos Vajna (2):
merge-recursive: move call_depth to struct merge_options
merge-recursive: move index_only to struct merge_options

 merge-recursive.c |  164 ++++++++++++++++++++++++++---------------------------
 merge-recursive.h |   13 ++++
 2 files changed, 93 insertions(+), 84 deletions(-)