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
TBTomash Brechko <tomash.brechko@gmail.com>
Date
Apr 10, 2007, 19:21 UTC
Message-ID
<20070410192130.GE4946@moonlight.home>
In-Reply-To
<b0943d9e0704100948k2b505916w5485b99e72d36c10@mail.gmail.com>
On Tue, Apr 10, 2007 at 17:48:29 +0100, Catalin Marinas wrote:
Show 12 quoted lines
> >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.

Aha, I've made a mistake, I wanted to say 'pull --merged and rebase --merged', not 'push'. The idea was that StGIT should be liberal when it decides if the patch was applied upsteam, it should not force the user to merge her own patch back because of different context upstream. Of course we can imagine the situation when during such merge the user will realize that her patch was applied upstream incorrectly, but such cases will be rare, so better not to enforce the merge.

But I see your point, and back then I didn't realize how it will affect the 'push' command.

So, I think the best would be to have 'pull'-like commands (pull, rebase, import, fold, sync) to be liberal by default (accept pathes with -C1), while 'push'-like commands (push, any other?) to be conservative (require full context match). And both classes should provide the way to explicitly control acceptance level.

-- 
   Tomash Brechko
Previous: Catalin MarinasNext: Tomash Brechko
Message 3 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.