From: Catalin Marinas Date: Tue, 10 Apr 2007 16:48:29 GMT Subject: Re: [PATCH (resend)] Pass -C1 to git-apply in StGIT's apply_diff() and apply_patch(). Message-ID: In-Reply-To: <20070409112422.GE11593@moonlight.home> On 09/04/07, Tomash Brechko 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