Last week, I started to move the preserve-merges functionnality to a new script.
I detailed a little bit why I wanted to do so in the first post, so basically, it boils down to two reasons:
- less code in the script: I have a clear view of what I have to convert, and
- preserve-merges is deprecated by rebase-merges.
This patch series is done in four commits:
- duplicate git-rebase--interactive.sh to git-rebase--preserve-merges.sh
- remove non-merge-preserving code from git-rebase--preserve-merges.sh
- make git-rebase.sh call git-rebase--preserve-merges.sh when it is called with -p
- remove merge-preserving code from git-rebase--interactive.sh
First, I made my changes on the master branch of git. Johannes, who made git rebase -i --root to use more from the sequencer (see his branch, js/sequencer-and-root-commits), advised me to rebase my branch onto his, as it would allow me to remove even more code from --interactive.sh.
After that, I sent my work to the mailing list.
The first commit of my patch series consist to duplicate git-rebase--interactive.sh. Nothing more, nothing less.
But when I rebased my work onto Johannes’, I forgot to update git-rebase--preserve-merges.sh, and I ended up with two different files, as pointed out by Stefan Beller. So I fixed it and sent a new version of my patch series.
Nobody said anything about the second attempt, but I noticed that I forgot to remove a function and that a bunch of variables could be stripped from git-rebase--interactive.sh.
So I made a third version of my patch series.
Johannes made some comments about the commit messages in my patch series. Basically, they did not elaborate enough on what they did. I changed them following his advice (here is the branch), but I did not re-submitted the series to the mailing list yet. Stefan was pretty enthusiastic about its state, though.
The current iteration of the patch takes git-rebase--interactive.sh from 1070 lines down to 284 lines. See it by yourself!