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

Re: [PATCH] git-apply doesn't handle same name patches well

From
Mike Ralphson <mike.ralphson@gmail.com>
Date
Jun 16, 2008, 09:01 UTC
Message-ID
<e2b179460806160201j133dac0eg37c88b5670541ff8@mail.gmail.com>
In-Reply-To
<1213376131-20967-1-git-send-email-dzickus@redhat.com>
2008/6/13 Don Zickus <dzickus@redhat.com>:
Show 7 quoted lines
> When working with a lot of people who backport patches all day long, every
> once in a while I get a patch that modifies the same file more than once
> inside the same patch...
>
> I have modified git-apply to cache the filenames of files it modifies such
> that if a later patch chunk modifies a file in the cache it will buffer the
> previously changed file instead of reading the original file from disk.

Excellent spot. A couple of things you might want to add to your new test cases would be examples where the first patch renames or removes a file (or two files are swapped) and a subsequent patch then touches the same path(s).

Mike
Previous: Junio C Hamano
Message 15 of 15 in “git-apply doesn't handle same name patches well”
  1. git-apply doesn't handle same name patches wellDon Zickus, Jun 13, 2008
  2. Johannes SchindelinJun 13, 2008
  3. Don ZickusJun 13, 2008
  4. path-list documentation: document all functions and data structuresMiklos Vajna, Jun 13, 2008
  5. Olivier MarinJun 13, 2008
  6. path-list documentation: document all functions and data structuresMiklos Vajna, Jun 14, 2008
  7. path-list documentation: document all functions and data structuresMiklos Vajna, Jun 14, 2008
  8. Olivier MarinJun 14, 2008
  9. Miklos VajnaJun 14, 2008
  10. Johannes SchindelinJun 14, 2008
  11. path-list documentation: document all functions and data structuresMiklos Vajna, Jun 14, 2008
  12. Jakub NarebskiJun 15, 2008
  13. path-list documentation: document all functions and data structuresMiklos Vajna, Jun 15, 2008
  14. Junio C HamanoJun 15, 2008
  15. Mike RalphsonJun 16, 2008

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.