Hi
As soon as I saw the announcement of 'git history', I knew that was something I was gonna use a lot. Especially the split functionality has always been somewhat of a hassle (at least for me) to do via an interactive rebase. I've played around with it a little, and it seems to work as it says on the tin.
So today I had occasion to put it to real use, and then I found two things I'd like to be able to do with it:
When a commit needs to be split into three or more commits, it is a little cumbersome to do iteratively, since the new commit to split obviously has a new sha, so one first has to figure out what that new id is and then do another "git history split". For higher values of "three" that becomes rather tedious. So it would be nice if there was an iterative mode, which after splitting off the first commit would automatically start again with the new child commit.
If "git add -p" had an answer meaning "yes to this hunk and all following in this file and all remaining files as well", this could probably even be the default behaviour of "git history split", as it would just require that one extra answer to be given after the first commit is split off in order to keep the current behaviour. Otherwise, I'd also be happy to have "git history iter-split" or "git history split --iter" or any other spelling.
The other thing I'd like is a sort of ultimate version of the above: What I needed in the concrete case at hand was actually to split two commit into n individual hunks each, then do an interactive rebase to combine those 2n commits to n commits (I had done changes "row-wise", but needed to change them to "column-wise"). For that, I would like to have had a completely automatic "git history atomize" that would split a commit into individual hunks, prefixing the commit subject with e.g. "[<filename> -- hunk #nn]". A subsequent 'git rebase -i' could then easily rearrange those and squash the related hunks.
Aside: are experimental commands eligible for teaching the completion logic about them? I.e., can we add a __git_history() to git-completion.bash? Aside from the obvious "let it know about existing subcommands", I'd love for "git history split <TAB>" to show the most recent ~20 (or something) commits in one-line format, stopping if there's a merge commit.
Thanks, Rasmus