threads / bug / 19329

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

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

## tl;dr

One message between May 13, 2009 and May 13, 2009.

replies: 0people: 1as markdown or json

Matt Graham· May 13, 2009, 04:41 UTC · lore

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)

← back to recent threads