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

Re: git-apply fails on creating a new file, with both -p and --directory specified

From
James Vega <vega.james@gmail.com>
Date
Dec 8, 2009, 03:39 UTC
Message-ID
<20091208033931.GK14401@jamessan.com>
In-Reply-To
<7vk4wyqigf.fsf@alter.siamese.dyndns.org>
On Mon, Dec 07, 2009 at 06:59:28PM -0800, Junio C Hamano wrote:
Show 8 quoted lines
> James Vega <vega.james@gmail.com> writes:
> 
> > It looks like this may have introduced a bug when staging a file
> > removal.  Here's an example git session showing the issue:
> > <<snipped>>
> 
> Thanks for a report, but I cannot get the evidence that the said patch has
> anything to do with the issue you illustrated.

Right, I incorrectly assumed the problem was with git-apply when I saw Steve's patch since the symptoms seemed similar.

I just finished a bisect, though, and the problem is in removing a non-empty file with "git add -p". This wasn't caught by existing tests because they only try to remove an empty file.

This was introduced in
8f0bef6 (git-apply--interactive: Refactor patch mode code, 2009-08-13)
-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <vega.james@gmail.com>
Previous: Jeff King
Message 14 of 14 in “git-apply fails on creating a new file, with both -p and --directory specified”
  1. Steven J. MurdochNov 23, 2009
  2. Junio C HamanoNov 25, 2009
  3. James VegaDec 7, 2009
  4. Junio C HamanoDec 8, 2009
  5. Junio C HamanoDec 8, 2009
  6. Jeff KingDec 8, 2009
  7. Jeff KingDec 8, 2009
  8. James VegaDec 8, 2009
  9. Junio C HamanoDec 8, 2009
  10. Jeff KingDec 8, 2009
  11. Junio C HamanoDec 8, 2009
  12. Junio C HamanoDec 8, 2009
  13. Jeff KingDec 8, 2009
  14. James VegaDec 8, 2009

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.