author | Thomas Rast <trast@student.ethz.ch> | |
Thu, 13 Aug 2009 12:29:39 +0000 (14:29 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 14 Aug 2009 19:40:09 +0000 (12:40 -0700) | ||
commit | 8f0bef6df91c48d79f982bdb55f784ce445ba5b2 | |
tree | a5393f2484c478f9c91a1abf25605e4aa19cc088 | tree | snapshot |
parent | 6517452d7a4269e9a34648a28b8931640299f458 | commit | diff |
git-apply--interactive: Refactor patch mode code
This makes some aspects of the 'git add -p' loop configurable (within
the code), so that we can later reuse git-add--interactive for other
similar tools.
Most fields are fairly straightforward, but APPLY gets a subroutine
(instead of just a string a la 'apply --cached') so that we can handle
'checkout -p', which will need to atomically apply the patch twice
(index and worktree).
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This makes some aspects of the 'git add -p' loop configurable (within
the code), so that we can later reuse git-add--interactive for other
similar tools.
Most fields are fairly straightforward, but APPLY gets a subroutine
(instead of just a string a la 'apply --cached') so that we can handle
'checkout -p', which will need to atomically apply the patch twice
(index and worktree).
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-add--interactive.perl | diff | blob | history |