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

Re: git-apply{,mbox,patch} should default to --unidiff-zero

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 6, 2007, 12:49 UTC
Message-ID
<Pine.LNX.4.64.0707061348050.4093@racer.site>
In-Reply-To
<20070706121441.GM3492@stusta.de>
Hi,
On Fri, 6 Jul 2007, Adrian Bunk wrote:
Show 16 quoted lines
> On Thu, Jul 05, 2007 at 10:41:51PM -0700, Junio C Hamano wrote:
> > Linus Torvalds <torvalds@linux-foundation.org> writes:
> >...
> > > Adrian has a point in that if there are lines to be deleted, that in 
> > > itself is context, and then the strict behaviour of "git-apply" is 
> > > arguably unnecessaily strict.
> > 
> > Not really.  That is true, unless you have two identical instances of 
> > the group of lines being deleted, in which case you cannot safely tell 
> > which instance is to be removed.
> >...
> 
> The interesting thing is that you can never safely tell it for any 
> amount of context - I've seen patches with three lines of context being 
> applied at the wrong place simply because there were several matching 
> contexts.

Yes, that is right. You can never safely tell. But now you want to allow even less context by default. In which you can even "more neverer" safely tell. That is why I am disagreeing with that change.

Ciao, Dscho

Previous: Adrian Bunk
Message 10 of 10 in “git-apply{,mbox,patch} should default to --unidiff-zero”
  1. Adrian BunkJul 5, 2007
  2. Johannes SchindelinJul 6, 2007
  3. Adrian BunkJul 6, 2007
  4. Johannes SchindelinJul 6, 2007
  5. Adrian BunkJul 6, 2007
  6. Johannes SchindelinJul 6, 2007
  7. Linus TorvaldsJul 6, 2007
  8. Junio C HamanoJul 6, 2007
  9. Adrian BunkJul 6, 2007
  10. Johannes SchindelinJul 6, 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.