aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-add.txt
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2008-07-03 00:00:00 +0200
committerJunio C Hamano <gitster@pobox.com>2008-07-02 15:31:49 -0700
commitac083c47ea226b470afab39d975e718a475a3c78 (patch)
tree2a0306b5162a8f9dd64068f18d57183b8013b9e8 /Documentation/git-add.txt
parent0beee4c6dec15292415e3d56075c16a76a22af54 (diff)
downloadgit-ac083c47ea226b470afab39d975e718a475a3c78.tar.gz
git-add--interactive: manual hunk editing mode
Adds a new option 'e' to the 'add -p' command loop that lets you edit the current hunk in your favourite editor. If the resulting patch applies cleanly, the edited hunk will immediately be marked for staging. If it does not apply cleanly, you will be given an opportunity to edit again. If all lines of the hunk are removed, then the edit is aborted and the hunk is left unchanged. Applying the changed hunk(s) relies on Johannes Schindelin's new --recount option for git-apply. Note that the "real patch" test intentionally uses (echo e; echo n; echo d) | git add -p even though the 'n' and 'd' are superfluous at first sight. They serve to get out of the interaction loop if git add -p wrongly concludes the patch does not apply. Many thanks to Jeff King <peff@peff.net> for lots of help and suggestions. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-add.txt')
-rw-r--r--Documentation/git-add.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index 011a743652..46dd56c12a 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -236,6 +236,7 @@ patch::
k - leave this hunk undecided, see previous undecided hunk
K - leave this hunk undecided, see previous hunk
s - split the current hunk into smaller hunks
+ e - manually edit the current hunk
? - print help
+
After deciding the fate for all hunks, if there is any hunk