{"thread":{"id":"32037","subject":"Revert option for git add --patch","startedAt":"2012-11-07T23:54:30Z","lastAt":"2012-11-08T08:46:18Z","messageCount":3,"participants":["Nathan Broadbent","Simon Rozet","Michal Kiedrowicz"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"202627","messageId":"CAPXHQbN0x-o_4rQO-Lq_gDTqs=beBE5XrrzJ1Th+7G2Lq7Dh_Q@mail.gmail.com","threadId":"32037","inReplyTo":"CAPXHQbOxNG0XN80rH6mM6iSVtCtU26Yio_XQ=5ofBHBpZN3VyQ@mail.gmail.com","subject":"Revert option for git add --patch","fromName":"Nathan Broadbent","fromEmail":"nathan.f77@gmail.com","sentAt":"2012-11-07T23:54:30Z","receivedAt":"2012-11-07T23:54:30Z","isPatch":false,"sender":{"key":"nathan.f77@gmail.com","avatar":"https://gravatar.com/avatar/04c985b22bf73709b7ef435ab9b5d707646972663afced8d5dad619666ce2409?d=mp&s=160"},"body":"Hi,\n\nI would like to propose a revert option for 'git add --patch', that\nreverts the hunk. I often use `git add -p` to skip whitespace changes\nwhen preparing a patch, and a 'revert' option would save me from\nrunning 'git checkout <file>' after I've staged the desired changes.\n\nI would propose adding r and R options for the 'Stage this hunk' menu,\nwith the following actions:\n\nr: Revert this hunk\nR: Revert this hunk and all other remaining hunks\n\ne.g. Stage this hunk [y/n/a/d/K/j/J/e/r/R?]?\n\n\nPlease let me know if you think this is a good idea.\n\n\nBest,\nNathan\n"},{"id":"202628","messageId":"CAHAYOozgUaV=GH8zOaJn1xLSM_M-aKmFovcOEVzYpNTBW6ifgQ@mail.gmail.com","threadId":"32037","inReplyTo":"CAPXHQbN0x-o_4rQO-Lq_gDTqs=beBE5XrrzJ1Th+7G2Lq7Dh_Q@mail.gmail.com","subject":"Re: Revert option for git add --patch","fromName":"Simon Rozet","fromEmail":"simon@rozet.name","sentAt":"2012-11-08T01:00:17Z","receivedAt":"2012-11-08T01:00:17Z","isPatch":false,"sender":{"key":"simon@rozet.name","avatar":null},"body":"help\n\nOn Wed, Nov 7, 2012 at 3:54 PM, Nathan Broadbent <nathan.f77@gmail.com> wrote:\n> Hi,\n>\n> I would like to propose a revert option for 'git add --patch', that\n> reverts the hunk. I often use `git add -p` to skip whitespace changes\n> when preparing a patch, and a 'revert' option would save me from\n> running 'git checkout <file>' after I've staged the desired changes.\n>\n> I would propose adding r and R options for the 'Stage this hunk' menu,\n> with the following actions:\n>\n> r: Revert this hunk\n> R: Revert this hunk and all other remaining hunks\n>\n> e.g. Stage this hunk [y/n/a/d/K/j/J/e/r/R?]?\n>\n>\n> Please let me know if you think this is a good idea.\n>\n>\n> Best,\n> Nathan\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"202629","messageId":"loom.20121108T094500-131@post.gmane.org","threadId":"32037","inReplyTo":"CAPXHQbN0x-o_4rQO-Lq_gDTqs=beBE5XrrzJ1Th+7G2Lq7Dh_Q@mail.gmail.com","subject":"Re: Revert option for git add --patch","fromName":"Michal Kiedrowicz","fromEmail":"michal.kiedrowicz@gmail.com","sentAt":"2012-11-08T08:46:18Z","receivedAt":"2012-11-08T08:46:18Z","isPatch":false,"sender":{"key":"michal.kiedrowicz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/14072847?v=4"},"body":"Nathan Broadbent <nathan.f77 <at> gmail.com> writes:\n\n> I would like to propose a revert option for 'git add --patch', that\n> reverts the hunk. I often use `git add -p` to skip whitespace changes\n> when preparing a patch, and a 'revert' option would save me from\n> running 'git checkout <file>' after I've staged the desired changes.\n\n\nDoesn't `git checkout -p` do what you describe?\n\nKind regards,\nMichal Kiedrowicz\n"}]}