Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-07-06 Thread Junio C Hamano
Johannes Schindelin writes: >> And I also do not see a reason why somebody wants to make the dist >> computation to be 1-based (iow, changing the minimum from 0 to 1) or >> one step not to be 1 (iow, giving 11 to e1 and e8), so while I agree >> it is not strictly necessary to cast the concrete

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-07-06 Thread Johannes Schindelin
Hi Junio, On Fri, 6 Jul 2018, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> > git rev-list --first-parent --bisect-all F..E >revs && > >> > test_line_count = 9 revs && > >> > for rev in E e1 e2 e3 e4 e5 e6 e7 e8 > >> > do > >> > grep "^$(git rev-parse $rev) " revs || > >> > {

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-07-06 Thread Junio C Hamano
Johannes Schindelin writes: >> > git rev-list --first-parent --bisect-all F..E >revs && >> > test_line_count = 9 revs && >> > for rev in E e1 e2 e3 e4 e5 e6 e7 e8 >> > do >> > grep "^$(git rev-parse $rev) " revs || >> > { >> > echo "$rev not shown" >&2 && >> > return 1 >> > } >> >

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-07-04 Thread Johannes Schindelin
Hi Junio, On Tue, 3 Jul 2018, Junio C Hamano wrote: > Tiago Botelho writes: > > > git rev-list --first-parent --bisect-all F..E >revs && > > test_line_count = 9 revs && > > for rev in E e1 e2 e3 e4 e5 e6 e7 e8 > > do > > grep "^$(git rev-parse $rev) " revs || > > { > > echo "$rev not

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-07-03 Thread Junio C Hamano
Tiago Botelho writes: > git rev-list --first-parent --bisect-all F..E >revs && > test_line_count = 9 revs && > for rev in E e1 e2 e3 e4 e5 e6 e7 e8 > do > grep "^$(git rev-parse $rev) " revs || > { > echo "$rev not shown" >&2 && > return 1 > } > done && > sed -e

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-07-03 Thread Tiago Botelho
On Fri, 29 Jun 2018 at 12:21, Johannes Schindelin wrote: > > Hi Junio, > > On Thu, 28 Jun 2018, Junio C Hamano wrote: > > > What I meant by "many separte grep calls" was to contrast these two > > approaches: > > > > * Have one typical output spelled out as "expect", take an output > >from an

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-06-29 Thread Johannes Schindelin
Hi Junio, On Thu, 28 Jun 2018, Junio C Hamano wrote: > What I meant by "many separte grep calls" was to contrast these two > approaches: > > * Have one typical output spelled out as "expect", take an output >from an actual run into "actual", make them comparable and then >do a compare

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-06-28 Thread Junio C Hamano
Johannes Schindelin writes: > On Wed, 27 Jun 2018, Junio C Hamano wrote: > >> Johannes Schindelin writes: >> >> >git rev-list --bisect-all --first-parent F..E >revs && >> ># only E, e1..e8 should be listed, nothing else >> >test_line_count = 9 revs && >> >for rev in E e1 e2 e3

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-06-28 Thread Johannes Schindelin
Hi Junio, On Wed, 27 Jun 2018, Junio C Hamano wrote: > Johannes Schindelin writes: > > > git rev-list --bisect-all --first-parent F..E >revs && > > # only E, e1..e8 should be listed, nothing else > > test_line_count = 9 revs && > > for rev in E e1 e2 e3 e4 e5 e6 e7 e8 > >

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-06-27 Thread Junio C Hamano
Johannes Schindelin writes: > git rev-list --bisect-all --first-parent F..E >revs && > # only E, e1..e8 should be listed, nothing else > test_line_count = 9 revs && > for rev in E e1 e2 e3 e4 e5 e6 e7 e8 > do > grep "^$(git rev-parse $rev) " revs ||

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-06-27 Thread Johannes Schindelin
Hi Junio, On Tue, 26 Jun 2018, Junio C Hamano wrote: > Christian Couder writes: > > > Obviousness is often not the same for everybody. > > ... which you just learned---what you thought obvious turns out to > be not so obvious after all, so you adjust to help your readers. Indeed. And trying

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-06-26 Thread Junio C Hamano
Christian Couder writes: > Obviousness is often not the same for everybody. ... which you just learned---what you thought obvious turns out to be not so obvious after all, so you adjust to help your readers. >> In this particular case it even feels as if this test is not even testing >> what

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-06-26 Thread Johannes Schindelin
Hi Chris, On Tue, 26 Jun 2018, Christian Couder wrote: > On Tue, Jun 26, 2018 at 4:10 PM, Johannes Schindelin > wrote: > > > > The point, for me, is: if this test fails, at some stage in the > > future, for any reason, it will be a major pain to even dissect what > > the test is supposed to do.

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-06-26 Thread Christian Couder
Hi Dscho, On Tue, Jun 26, 2018 at 4:10 PM, Johannes Schindelin wrote: > > On Tue, 26 Jun 2018, Christian Couder wrote: > >> On Mon, Jun 25, 2018 at 7:33 PM, Junio C Hamano wrote: >> >> > I hate to say this, but the above looks like a typical >> > unmaintainable mess. >> > >> > What happens when

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-06-26 Thread Johannes Schindelin
Hi Chris, On Tue, 26 Jun 2018, Christian Couder wrote: > On Mon, Jun 25, 2018 at 7:33 PM, Junio C Hamano wrote: > > Tiago Botelho writes: > > > >> +test_expect_success "--bisect-all --first-parent" ' > >> +cat >expect1 < >> +$(git rev-parse CC) (dist=2) > >> +$(git rev-parse EX) (dist=1) > >>

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-06-26 Thread Christian Couder
On Mon, Jun 25, 2018 at 7:33 PM, Junio C Hamano wrote: > Tiago Botelho writes: > >> +test_expect_success "--bisect-all --first-parent" ' >> +cat >expect1 <> +$(git rev-parse CC) (dist=2) >> +$(git rev-parse EX) (dist=1) >> +$(git rev-parse D) (dist=1) >> +$(git rev-parse FX) (dist=0) >> +EOF >>

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-06-25 Thread Junio C Hamano
Tiago Botelho writes: > +test_expect_success "--bisect-all --first-parent" ' > +cat >expect1 < +$(git rev-parse CC) (dist=2) > +$(git rev-parse EX) (dist=1) > +$(git rev-parse D) (dist=1) > +$(git rev-parse FX) (dist=0) > +EOF > + > +cat >expect2 < +$(git rev-parse CC) (dist=2) > +$(git

[RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-06-22 Thread Tiago Botelho
This will enable users to implement bisecting on first parents which can be useful for when the commits from a feature branch that we want to merge are not always tested. Signed-off-by: Tiago Botelho --- This patch resolves every issue with the unit tests. The bug detected by Junio regarding