author | Junio C Hamano <gitster@pobox.com> | |
Wed, 6 Apr 2011 21:12:34 +0000 (14:12 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 29 Apr 2011 22:27:59 +0000 (15:27 -0700) | ||
commit | 9dce832354502a04e724c5776e60fc6189182307 | |
tree | 8edc8b5ca9bd3032852eb313e004b81e30cc89d6 | tree | snapshot |
parent | f3217e2b1791580ce6499b800e93989d312f9718 | commit | diff |
add--interactive.perl: factor out repeated --recount option
Depending on the direction and the target of patch application, we would
need to pass --cached and --reverse to underlying "git apply". Also we
only pass --check when we are not applying but just checking.
But we always pass --recount since 8cbd431 (git-add--interactive: replace
hunk recounting with apply --recount, 2008-07-02). Instead of repeating
the same --recount over and over again, move it to a single place that
actually runs the command, namely, "run_git_apply" subroutine.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Depending on the direction and the target of patch application, we would
need to pass --cached and --reverse to underlying "git apply". Also we
only pass --check when we are not applying but just checking.
But we always pass --recount since 8cbd431 (git-add--interactive: replace
hunk recounting with apply --recount, 2008-07-02). Instead of repeating
the same --recount over and over again, move it to a single place that
actually runs the command, namely, "run_git_apply" subroutine.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-add--interactive.perl | diff | blob | history |