{"action":"created","issue":{"url":"https://api.github.com/repos/magit/magit/issues/2332","labels_url":"https://api.github.com/repos/magit/magit/issues/2332/labels{/name}","comments_url":"https://api.github.com/repos/magit/magit/issues/2332/comments","events_url":"https://api.github.com/repos/magit/magit/issues/2332/events","html_url":"https://github.com/magit/magit/pull/2332","id":111044793,"number":2332,"title":"Reverse in index","user":{"login":"npostavs","id":287742,"avatar_url":"https://avatars.githubusercontent.com/u/287742?v=3","gravatar_id":"","url":"https://api.github.com/users/npostavs","html_url":"https://github.com/npostavs","followers_url":"https://api.github.com/users/npostavs/followers","following_url":"https://api.github.com/users/npostavs/following{/other_user}","gists_url":"https://api.github.com/users/npostavs/gists{/gist_id}","starred_url":"https://api.github.com/users/npostavs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npostavs/subscriptions","organizations_url":"https://api.github.com/users/npostavs/orgs","repos_url":"https://api.github.com/users/npostavs/repos","events_url":"https://api.github.com/users/npostavs/events{/privacy}","received_events_url":"https://api.github.com/users/npostavs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-12T20:00:26Z","updated_at":"2015-10-12T22:17:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/magit/magit/pulls/2332","html_url":"https://github.com/magit/magit/pull/2332","diff_url":"https://github.com/magit/magit/pull/2332.diff","patch_url":"https://github.com/magit/magit/pull/2332.patch"},"body":"As discussed in #2330, the workflow for splitting commits requires a double reversal that can be done in a single step, which is quicker and simpler. The main difficulty is how to name and bind the command.\r\n\r\nInitially I thought of putting it in the revert popup.\r\nAnother idea is to bind to `u` for committed changes (instead of user-error \"can't unstage committed changes\"). In patch here I've co-opted the unstage command, I couldn't quite see how to change the binding, would we need an unstage-thing command and then remapping in the section keymaps (but committed hunks are the same section type as uncommitted ones, so we migh have a problem there)?\r\n\r\nFor naming I started with `magit-reverse-index`. I also thought of `magit-anti-stage` (too cryptic? although @MikeSanMichel2 did independently come up with \"Stage Anti-Hunk\" as a label).\r\n"},"comment":{"url":"https://api.github.com/repos/magit/magit/issues/comments/147536098","html_url":"https://github.com/magit/magit/pull/2332#issuecomment-147536098","issue_url":"https://api.github.com/repos/magit/magit/issues/2332","id":147536098,"user":{"login":"npostavs","id":287742,"avatar_url":"https://avatars.githubusercontent.com/u/287742?v=3","gravatar_id":"","url":"https://api.github.com/users/npostavs","html_url":"https://github.com/npostavs","followers_url":"https://api.github.com/users/npostavs/followers","following_url":"https://api.github.com/users/npostavs/following{/other_user}","gists_url":"https://api.github.com/users/npostavs/gists{/gist_id}","starred_url":"https://api.github.com/users/npostavs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npostavs/subscriptions","organizations_url":"https://api.github.com/users/npostavs/orgs","repos_url":"https://api.github.com/users/npostavs/repos","events_url":"https://api.github.com/users/npostavs/events{/privacy}","received_events_url":"https://api.github.com/users/npostavs/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T22:17:05Z","updated_at":"2015-10-12T22:17:05Z","body":"I added `magit-uncommit-extend` which does anti-stage and then commit-extend, bound to `V e`. It occurred to me that the other revert commands also commit directly, so bundling the commit action makes it closer to them.\r\n\r\n> Otherwise, explaining how the commit really isn't affected, but you now have an electron in your working directory and its positron in the index, and that you need to \"C e\", to annihalate with part of the cherry-picked commit, so it can become the new, modified, cherry-picked commit? I mean, that's just pedagogically cruel.\r\n\r\nBut also hilarious :D"}}