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

2015-06-03 Thread Matthieu Moy
Remi Galan Alfonso writes: > Matthieu Moy 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).

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

2015-06-03 Thread Remi Galan Alfonso
Matthieu Moy 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 understood correctly, then th

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

2015-06-03 Thread Matthieu Moy
Galan Rémi 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. > +rebase.missingCommitsCheck:: > + If set to "war

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

2015-06-03 Thread Remi Galan Alfonso
Galan Rémi 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 <"$todo".miss >"$todo".miss

[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 thi