Re: [PATCH v4 5/6] bisect--helper: reimplement `bisect_run` shell function in C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Miriam,

On Tue, 17 Aug 2021, Miriam R. wrote:

> El mar, 17 ago 2021 a las 13:42, Johannes Schindelin
> (<Johannes.Schindelin@xxxxxx>) escribió:
> >
> > On Tue, 17 Aug 2021, Miriam Rubio wrote:
> >
> > > From: Tanushree Tumane <tanushreetumane@xxxxxxxxx>
> > >
> > > [...]
> > > +
> > > +             if (res == 125)
> > > +                     strvec_push(&args, "skip");
> > > +             else if (res > 0)
> > > +                     strvec_push(&args, terms->term_bad);
> > > +             else
> > > +                     strvec_push(&args, terms->term_good);
> > > +
> > > +             res = bisect_state(terms, args.v, args.nr);
> >
> > Since `args.nr` will always be 1, it would probably be better to use
> > something like this:
> >
> >                 const char *new_state;
> >
> >                 [...]
> >                 if (res == 125)
> >                         new_state = "skip";
> >                 else
> >                         new_state = res > 0 ?
> >                                 terms->term_bad : terms->term_good;
> >
> >                 res = bisect_state(terms, &new_state, 1);
> >
>
> Yes, indeed. I will change it.
>
> > Also: I think at this stage, an equivalent to `cat
> > "$GIT_DIR/BISECT_RUN"` is missing.
>
> In the previous patch series (v3), I implemented the equivalent to the
> cat command but I understood reviewers wanted to print the output to the
> user, so I reverted my changes for this version.
> https://lore.kernel.org/git/20210411095538.34129-4-mirucam@xxxxxxxxx/

I am a bit confused: doesn't `bisect_state()` write to the `BISECT_RUN`
file? If so, I think we do need to show the contents by opening the file
and piping it to `stdout`.

FWIW I read
https://lore.kernel.org/git/CAP8UFD3X24F3qgefHpi00PM-KUk+vcqxwy2Dbngbyj7ciavCVQ@xxxxxxxxxxxxxx/
to mean the same thing, although I have to admit that I am not 100%
certain.

Just to make sure: with this patch, at the end of a `git bisect` run, the
user is shown the commit message of the first bad commit?

Ciao,
Dscho

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux