From: Mike Ralphson Date: Mon, 16 Jun 2008 09:01:41 GMT Subject: Re: [PATCH] git-apply doesn't handle same name patches well Message-ID: In-Reply-To: <1213376131-20967-1-git-send-email-dzickus@redhat.com> 2008/6/13 Don Zickus : > 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