{"thread":{"id":"24093","subject":"[PATCH] add-interactive: Clarify “remaining hunks in the file”","startedAt":"2010-06-13T03:32:51Z","lastAt":"2010-06-13T03:32:51Z","messageCount":1,"participants":["Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"143596","messageId":"20100613033251.GA2488@burratino","threadId":"24093","inReplyTo":null,"subject":"[PATCH] add-interactive: Clarify “remaining hunks in the file”","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-06-13T03:32:51Z","receivedAt":"2010-06-13T03:32:51Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"The \"a\" and \"d\" commands to ‘add --patch’ (accept/reject rest of file)\ninteract with \"j\", \"g\", and \"/\" (skip some hunks) in a perhaps\nconfusing way: after accepting or rejecting all _later_ hunks in the\nfile, they return to the earlier, skipped hunks and prompt the user\nabout them again.\n\nThis behavior can be very useful in practice.  One can still accept or\nreject _all_ undecided hunks in a file by using the \"g\" command to\nmove to hunk #1 first.\n\nReported-by: Frédéric Brière <fbriere@fbriere.net>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\nFrom <http://bugs.debian.org/526014>.  Thanks, Frédéric.\n\n Documentation/git-add.txt |    6 +++---\n git-add--interactive.perl |    6 +++---\n 2 files changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/git-add.txt b/Documentation/git-add.txt\nindex 51cbeb7..74741a4 100644\n--- a/Documentation/git-add.txt\n+++ b/Documentation/git-add.txt\n@@ -266,9 +266,9 @@ patch::\n \n        y - stage this hunk\n        n - do not stage this hunk\n-       q - quit, do not stage this hunk nor any of the remaining ones\n-       a - stage this and all the remaining hunks in the file\n-       d - do not stage this hunk nor any of the remaining hunks in the file\n+       q - quit; do not stage this hunk nor any of the remaining ones\n+       a - stage this hunk and all later hunks in the file\n+       d - do not stage this hunk nor any of the later hunks in the file\n        g - select a hunk to go to\n        / - search for a hunk matching the given regex\n        j - leave this hunk undecided, see next undecided hunk\ndiff --git a/git-add--interactive.perl b/git-add--interactive.perl\nindex 21f1330..27fc793 100755\n--- a/git-add--interactive.perl\n+++ b/git-add--interactive.perl\n@@ -1111,9 +1111,9 @@ sub help_patch_cmd {\n \tprint colored $help_color, <<EOF ;\n y - $verb this hunk$target\n n - do not $verb this hunk$target\n-q - quit, do not $verb this hunk nor any of the remaining ones\n-a - $verb this and all the remaining hunks in the file\n-d - do not $verb this hunk nor any of the remaining hunks in the file\n+q - quit; do not $verb this hunk nor any of the remaining ones\n+a - $verb this hunk and all later hunks in the file\n+d - do not $verb this hunk nor any of the later hunks in the file\n g - select a hunk to go to\n / - search for a hunk matching the given regex\n j - leave this hunk undecided, see next undecided hunk\n-- \n1.7.1\n"}]}