<dag@xxxxxxxx> writes: > Antonio Ospite <ospite@xxxxxxxxxxxxxxxxx> writes: > >> I find the x/exec function in "git rebase -i" very useful, but it may >> be tedious to edit the commit list to add something like "make test" >> after each commit. > > I've taken a more general approach inspired by > run-command-on-git-revisions at > https://github.com/garybernhardt/dotfiles/tree/master/bin > > I took that and turned it into a git-run-command subcommand. It will > take an arbitrary command and run it on each revision specified by a > revlist. That's sensible too. The nice things with running commands in "git rebase" are: * It's likely to be the place where you want to run some tests. The typical use-case is that you have a patch serie whose last revision passes tests, and you want to check that intermediate commits also do. At that point, you probably want to rebase against upstream too, to make sure you're developping against the latest revision, before sening a patch serie or pushing. * if the "exec" command fails, you're likely to be exactly in the right place to fix it: fix the bug, run "git commit --amend", and "git rebase --continue". The nice thing with your approach (as I understand it) is that it doesn't require rewritting history, and may apply to all commits in non-linear history. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html