[PATCH/RFCv4 2/2] git rebase -i: warn about removed commits

2015-06-03 Thread Galan Rémi
Check if commits were removed (i.e. a line was deleted) and print warnings or abort git rebase depending on the value of the configuration variable rebase.missingCommits. This patch gives the user the possibility to avoid silent loss of information (losing a commit through deleting the line in

Re: [PATCH/RFCv4 2/2] git rebase -i: warn about removed commits

2015-06-03 Thread Remi Galan Alfonso
Galan Rémi remi.galan-alfo...@ensimag.grenoble-inp.fr writes: +comm -2 -3 $todo.oldsha1 $todo.newsha1 $todo.miss + +# Make the list user-friendly +opt=--no-walk=sorted --format=oneline --abbrev-commit --stdin +git rev-list $opt

Re: [PATCH/RFCv4 2/2] git rebase -i: warn about removed commits

2015-06-03 Thread Remi Galan Alfonso
Matthieu Moy matthieu@grenoble-inp.fr writes: You're using $1 and $2 only to redirect input and output. I would find it more elegant to write todo_list_to_sha_list as a filter, and do the redirection in the call site (to keep the option of using todo_list_to_sha_list in a pipe). If I

Re: [PATCH/RFCv4 2/2] git rebase -i: warn about removed commits

2015-06-03 Thread Matthieu Moy
Remi Galan Alfonso remi.galan-alfo...@ensimag.grenoble-inp.fr writes: Matthieu Moy matthieu@grenoble-inp.fr writes: You're using $1 and $2 only to redirect input and output. I would find it more elegant to write todo_list_to_sha_list as a filter, and do the redirection in the call site

Re: [PATCH/RFCv4 2/2] git rebase -i: warn about removed commits

2015-06-03 Thread Matthieu Moy
Galan Rémi remi.galan-alfo...@ensimag.grenoble-inp.fr writes: Check if commits were removed (i.e. a line was deleted) and print warnings or abort git rebase depending on the value of the configuration variable rebase.missingCommits. Spelled missingCommitsCheck everywhere else.