January 2018

S M T W T F S
  123456
78910111213
14151617181920
21222324252627
28293031   

Style Credit

Expand Cut Tags

No cut tags
Wednesday, November 3rd, 2010 07:49 pm (UTC)

You mean, the hunk header with the @@ and the line numbers? If so, then no, but then I use Emacs’s diff-editing mode, which automatically keeps hunk headers correct as you edit. However, I’ve just tried env EDITOR=vim git add -p, and edited a patch in a way that changes the number of lines added and removed, and Git seems to have handled it fine.

(Sorry to nitpick the terminology, but I think that’s what you mean, and for diffs, “context” usually means the space-prefixed lines that show surrounding unchanged code, and that can be used to apply patches even when the line numbers match only fuzzily.)

Reply

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting