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

[BUG] git add -p doesn't actually add

From
Matt Graham <mdg149@gmail.com>
Date
May 13, 2009, 04:41 UTC
Message-ID
<1c5969370905122141x527e46dev3929c4cb43c9409d@mail.gmail.com>

Hi, I'm having a couple problems with git add -p

First problem:
1. I run "git add -p filename"
2. Split the first diff
3. Edit the first diff
4. Don't change the file, immediately write it and close the editor
I get this error:

Stage this hunk [y,n,q,a,d,/,j,J,g,e,?]? e error: patch failed: src/pygrate/pygrator.py:1 error: src/pygrate/pygrator.py: patch does not apply Your edited hunk does not apply. Edit again (saying "no" discards!) [y/n]? n

Second problem (on the same file):
1. I run "git add -p filename"
2. Split the first diff
3. answer 'y' to all
I run git status and it says the file is changed but not updated

The attached file shows this behavior for my version of git. git version 1.6.3.9.g6345 (pulled from master tonight)

Message 1 of 1 in “[BUG] git add -p doesn't actually add”
  1. Matt GrahamMay 13, 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.