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

2015-06-03 Thread Remi Galan Alfonso
> Matthieu Moy writes: > > Ideally, you would check the list of commits displayed too. If the > > commits sha1 are stable, this should be easy to do. If it's too hard to > > test, I'd say its not worth the trouble, but others may disagree. > > Originally I chose not to check if the SHA-1 were

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

2015-06-03 Thread Remi Galan Alfonso
Matthieu Moy writes: > Ideally, you would check the list of commits displayed too. If the > commits sha1 are stable, this should be easy to do. If it's too hard to > test, I'd say its not worth the trouble, but others may disagree. Originally I chose not to check if the SHA-1 were corrects since

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

2015-06-02 Thread Matthieu Moy
Remi Galan Alfonso writes: > Checking that the warning was correctly displayed like in the test for > "warn" if I understood correctly. About that, is checking that the > first line is "Warning: some commits may have been dropped > accidentally." (like in the test for "warn") enough, or should I

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

2015-06-02 Thread Junio C Hamano
Remi Galan Alfonso writes: > In this case it is not true, because of the infile and outfile being > identical. However sort does have a -o (-output) that I missed that > allows avoiding using echo or writing in another file; I'm correcting > with this. Even though it is in POSIX, some implementa

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

2015-06-02 Thread Remi Galan Alfonso
Matthieu Moy writes: > > Galan Rémi writes: > > +# Sort the SHA-1 and compare them > > +echo "$(sort -u "$todo".oldsha1)" >"$todo".oldsha1 > > +echo "$(sort -u "$todo".newsha1)" >"$todo".newsha1 > > Useless uses of echo. > > echo $(foo) -> foo In

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

2015-06-02 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 according to the value of the s/according to/depending on/ (although both translate to the same "selon" in french ;-)) > configuration variable rebase.missingCommitsCheckLevel.

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

2015-06-02 Thread Galan Rémi
Check if commits were removed (i.e. a line was deleted) and print warnings or abort git rebase according to the value of the configuration variable rebase.missingCommitsCheckLevel. Add the configuration variable rebase.missingCommitsCheckLevel. - When unset or set to "ignore", no checking is d