On 09/04/07, Tomash Brechko <tomash.brechko@xxxxxxxxx> 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 - 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