{"action":"created","issue":{"url":"https://api.github.com/repos/tpope/vim-fugitive/issues/797","repository_url":"https://api.github.com/repos/tpope/vim-fugitive","labels_url":"https://api.github.com/repos/tpope/vim-fugitive/issues/797/labels{/name}","comments_url":"https://api.github.com/repos/tpope/vim-fugitive/issues/797/comments","events_url":"https://api.github.com/repos/tpope/vim-fugitive/issues/797/events","html_url":"https://github.com/tpope/vim-fugitive/issues/797","id":156127869,"node_id":"MDU6SXNzdWUxNTYxMjc4Njk=","number":797,"title":"RFE: support for the interactive rebase","user":{"login":"mcepl","id":198999,"node_id":"MDQ6VXNlcjE5ODk5OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/198999?v=4","gravatar_id":"","url":"https://api.github.com/users/mcepl","html_url":"https://github.com/mcepl","followers_url":"https://api.github.com/users/mcepl/followers","following_url":"https://api.github.com/users/mcepl/following{/other_user}","gists_url":"https://api.github.com/users/mcepl/gists{/gist_id}","starred_url":"https://api.github.com/users/mcepl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcepl/subscriptions","organizations_url":"https://api.github.com/users/mcepl/orgs","repos_url":"https://api.github.com/users/mcepl/repos","events_url":"https://api.github.com/users/mcepl/events{/privacy}","received_events_url":"https://api.github.com/users/mcepl/received_events","type":"User","site_admin":false},"labels":[{"id":2400514,"node_id":"MDU6TGFiZWwyNDAwNTE0","url":"https://api.github.com/repos/tpope/vim-fugitive/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-05-22T00:16:14Z","updated_at":"2018-12-26T20:37:01Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I need to reorganize a huge branch with plenty of commits on many files (porting of `M2Crypto` to Python 3) and in the end in order to make it at least some order in it, I exploded each large commits touching many files with this script (called `git-split-by-file`):\n\n``` sh\n#!/bin/sh                                                                       \nset -xeu                                                                        \n\nif [ $# -gt 0 ] ; then                                                          \n    MSG=$(cat \"$1\")                                                             \nelse                                                                            \n    if [ -f \".git/rebase-merge/message\" ] ; then                                \n                MSG=$(cat .git/rebase-merge/message)                            \n        else                                                                    \n                read -e -p \"Enter the merge commit message: \" MSG               \n                if [ -z \"$MSG\" ] ; then                                         \n                        exit 1                                                  \n                fi                                                              \n    fi                                                                          \nfi                                                                              \n\nfunction add_one_file () {                                                      \n    FILE=\"$1\"                                                                   \n    git add \"$FILE\"                                                             \n    echo -n \"$FILE: ${MSG}\"|git commit -F -                                     \n}                                                                               \n\ngit reset HEAD~                                                                 \nfor f in $(git diff |lsdiff --strip 1) ; do                                     \n    add_one_file \"$f\"                                                           \ndone\n```\n\nSo, splitting is not a problem, but now I have a branch with not 40, but 120 commits. I have cut it down back to 50 by combining commits touching one file into one, but now I would like to cut the branch even further down: by combining many tiny but related commits into one. The best workflow I found (and I don't like it) is to have all those commits on gitlab opened in the Firefox, in the terminal to have opened `git rebase -i` window and picking and combining commits to be squashed together.\n\nWhich is quite crazy. What I am dreaming about is to have the `git rebase --interactive` todo list opened in a vim buffer, and then be able to open from inside of this buffer underlying commits in `Gdiff` window, so I can see exactly which files I am picking for squash. This would IMHO hugely improve efficiency of my `git rebase -i` session.\n\nWhat do you think?\n"},"comment":{"url":"https://api.github.com/repos/tpope/vim-fugitive/issues/comments/450022627","html_url":"https://github.com/tpope/vim-fugitive/issues/797#issuecomment-450022627","issue_url":"https://api.github.com/repos/tpope/vim-fugitive/issues/797","id":450022627,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDAyMjYyNw==","user":{"login":"tpope","id":378,"node_id":"MDQ6VXNlcjM3OA==","avatar_url":"https://avatars0.githubusercontent.com/u/378?v=4","gravatar_id":"","url":"https://api.github.com/users/tpope","html_url":"https://github.com/tpope","followers_url":"https://api.github.com/users/tpope/followers","following_url":"https://api.github.com/users/tpope/following{/other_user}","gists_url":"https://api.github.com/users/tpope/gists{/gist_id}","starred_url":"https://api.github.com/users/tpope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpope/subscriptions","organizations_url":"https://api.github.com/users/tpope/orgs","repos_url":"https://api.github.com/users/tpope/repos","events_url":"https://api.github.com/users/tpope/events{/privacy}","received_events_url":"https://api.github.com/users/tpope/received_events","type":"User","site_admin":false},"created_at":"2018-12-26T20:37:01Z","updated_at":"2018-12-26T20:37:01Z","author_association":"OWNER","body":"Glad you caught that before we dove any deeper. I was a bit confused reading the source but assumed `git-rebase--preserve-merges.sh` did the heavy lifting.\r\n\r\nWe could still fall back to the boring dance of running rebase once to copy the sequence file and bail, editing the copy, and then a second rebase to copy the edit back in. I was reluctant to do this because of portability reasons, but after source diving it seems clear we can use a shell script even on Windows. My main annoyance with this approach is `--autostash` churn, but I guess it's still better than nothing.\r\n\r\nA clean solution could probably achieved with jobs, but lord, the fact I would have to implement it twice for Vim 8 and Neovim really dampens my motivation there."}}
{"actor":{"display_login":"tpope"}}