Thread (6 messages) flat view 6 messages, 2 authors, 2016-06-15

Re: [PATCH (resend)] Pass -C1 to git-apply in StGIT's apply_diff() and apply_patch().

From: Catalin Marinas <hidden>
Date: 2016-06-15 22:43:03

On 09/04/07, Tomash Brechko [off-list ref] wrote:
Running git-apply without -C is too restrictive: when the patch has
some fuzz (it could have been applied upstream with the fuzz, or
different local branches have slightly different context), StGIT would
start manual merge because of the conflict in the context.  Passing
-C1 makes git-apply behave close to default mode of diff/patch: 'diff'
generates 3 lines of context, and 'patch' allows 2 line mismatch,
i.e. it requires the match of at least one context line.

Fix in apply_diff() relaxes the restriction in 'push --merged' and
'rebase --merged' for detection of upstream merges, fix in
apply_patch() does relaxation 'import', 'fold' and 'sync' commands.
Thanks for the patch. I'm OK with -C1 in apply_patch() but I'm a bit
concerned with the 'push/rebase --merged' logic being relaxed. There
is also the reporting of patches being modified during 'push', i.e.
the push succeeded only after a three-way merge.

I think I could add separate config options for both apply_diff and
apply_patch, only that it might confuse users not knowing the StGIT
internals.

-- 
Catalin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help