]> rtime.felk.cvut.cz Git - git.git/commitdiff
add-interactive: Clarify “remaining hunks in the file”
authorJonathan Nieder <jrnieder@gmail.com>
Sun, 13 Jun 2010 03:32:51 +0000 (22:32 -0500)
committerJunio C Hamano <gitster@pobox.com>
Sun, 13 Jun 2010 17:05:02 +0000 (10:05 -0700)
The "a" and "d" commands to ‘add --patch’ (accept/reject rest of file)
interact with "j", "g", and "/" (skip some hunks) in a perhaps
confusing way: after accepting or rejecting all _later_ hunks in the
file, they return to the earlier, skipped hunks and prompt the user
about them again.

This behavior can be very useful in practice.  One can still accept or
reject _all_ undecided hunks in a file by using the "g" command to
move to hunk #1 first.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-add.txt
git-add--interactive.perl

index 51cbeb7032865599317fd9d7d36a9c9e2f8cc0c5..74741a42f409a7af5c60584a0d3b7a0be851811c 100644 (file)
@@ -266,9 +266,9 @@ patch::
 
        y - stage this hunk
        n - do not stage this hunk
-       q - quit, do not stage this hunk nor any of the remaining ones
-       a - stage this and all the remaining hunks in the file
-       d - do not stage this hunk nor any of the remaining hunks in the file
+       q - quit; do not stage this hunk nor any of the remaining ones
+       a - stage this hunk and all later hunks in the file
+       d - do not stage this hunk nor any of the later hunks in the file
        g - select a hunk to go to
        / - search for a hunk matching the given regex
        j - leave this hunk undecided, see next undecided hunk
index 21f1330a5bf26c955051ce9cf263289d90c7667b..27fc79347af428dd39daa5b550814cc6cf980510 100755 (executable)
@@ -1111,9 +1111,9 @@ sub help_patch_cmd {
        print colored $help_color, <<EOF ;
 y - $verb this hunk$target
 n - do not $verb this hunk$target
-q - quit, do not $verb this hunk nor any of the remaining ones
-a - $verb this and all the remaining hunks in the file
-d - do not $verb this hunk nor any of the remaining hunks in the file
+q - quit; do not $verb this hunk nor any of the remaining ones
+a - $verb this hunk and all later hunks in the file
+d - do not $verb this hunk nor any of the later hunks in the file
 g - select a hunk to go to
 / - search for a hunk matching the given regex
 j - leave this hunk undecided, see next undecided hunk