git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
CMCatalin Marinas <catalin.marinas@gmail.com>
Date
Apr 10, 2007, 16:48 UTC
Message-ID
<b0943d9e0704100948k2b505916w5485b99e72d36c10@mail.gmail.com>
In-Reply-To
<20070409112422.GE11593@moonlight.home>
On 09/04/07, Tomash Brechko <tomash.brechko@gmail.com> wrote:
Show 11 quoted lines
> 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
Previous: Tomash BrechkoNext: Tomash Brechko
Message 2 of 6 in “Pass -C1 to git-apply in StGIT's apply_diff() and apply_patch().”
  1. Pass -C1 to git-apply in StGIT's apply_diff() and apply_patch().Tomash Brechko, Apr 9, 2007
  2. Catalin MarinasApr 10, 2007
  3. Tomash BrechkoApr 10, 2007
  4. Tomash BrechkoApr 10, 2007
  5. Catalin MarinasApr 10, 2007
  6. Tomash BrechkoApr 11, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.