Re: [PATCH v2 7/8] pack-objects: introduce '--stdin-packs=follow'

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

 



On Tue, Apr 15, 2025 at 1:45 PM Taylor Blau <me@xxxxxxxxxxxx> wrote:

> > > @@ -4467,6 +4484,23 @@ static int is_not_in_promisor_pack(struct commit *commit, void *data) {
> > >         return is_not_in_promisor_pack_obj((struct object *) commit, data);
> > >  }
> > >
> > > +static int parse_stdin_packs_mode(const struct option *opt, const char *arg,
> > > +                                 int unset)
> > > +{
> > > +       enum stdin_packs_mode *mode = opt->value;
> > > +
> > > +       if (unset)
> > > +               *mode = STDIN_PACKS_MODE_NONE;
> > > +       else if (!arg || !*arg)
> > > +               *mode = STDIN_PACKS_MODE_STANDARD;
> >
> > I don't understand why you have both a None mode and a Standard mode,
> > especially since the implementation seems to only care about whether
> > or not the Follow mode has been set.  Shouldn't these both be setting
> > mode to the same value?
>
> I'm not sure I follow your question... stdin_packs is a tri-state. It
> can be off, on in standard/legacy mode, or on in follow mode.

I was just confused.  I looked in the code for
STDIN_PACKS_MODE_{NONE,STANDARD,FOLLOW}, and other than initial setup,
only the _FOLLOW variant was used anywhere.  I overlooked the "if
(stdin_packs" usage, which is what further distinguishes between _NONE
and _STANDARD.  Sorry.





[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