GSoC with git, week 4

Le dans «GSoC 2018» par Alban
Mots-clés: ,

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:

  1. duplicate git-rebase--interactive.sh to git-rebase--preserve-merges.sh
  2. remove non-merge-preserving code from git-rebase--preserve-merges.sh
  3. make git-rebase.sh call git-rebase--preserve-merges.sh when it is called with -p
  4. 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.

1st attempt

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.

2nd attempt

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.

3rd attempt

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!

Feel free to check out the blogs of Pratik Karki and Paul-Sebastian Ungureanu, my co-students participating to the GSoC with git!