Re: [PATCH v2 12/22] tree-diff.c: move S_DIFFTREE_IFXMIN_NEQ define from cache.h

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

 



On Mon, May 1, 2023 at 6:06 PM Elijah Newren <newren@xxxxxxxxx> wrote:
>
> On Mon, May 1, 2023 at 9:35 AM Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> wrote:
> >
> > On Sat, Apr 22 2023, Elijah Newren via GitGitGadget wrote:
> [...]
> > > --- a/tree-diff.c
> > > +++ b/tree-diff.c
> > > @@ -6,6 +6,19 @@
> > >  #include "diffcore.h"
> > >  #include "tree.h"
> > >
> > > +/*
> > > + * Some mode bits are also used internally for computations.
> > > + *
> > > + * They *must* not overlap with any valid modes, and they *must* not be emitted
> > > + * to outside world - i.e. appear on disk or network. In other words, it's just
> > > + * temporary fields, which we internally use, but they have to stay in-house.
> > > + *
> > > + * ( such approach is valid, as standard S_IF* fits into 16 bits, and in Git
> > > + *   codebase mode is `unsigned int` which is assumed to be at least 32 bits )
> > > + */
> > > +
> > > +#define S_DIFFTREE_IFXMIN_NEQ        0x80000000
> > > +
> > >  /*
> > >   * internal mode marker, saying a tree entry != entry of tp[imin]
> > >   * (see ll_diff_tree_paths for what it means there)
> >
> > As it's only used in tree-diff.c, should this change not be instead
> > changing how we define S_IFXMIN_NEQ itself, and combining the two
> > comments seen here (the latter only partially, in the context).
> >
> > Not that this makes things worse or anything...
>
> Hmm, that makes sense; I'll make the tweak.  Thanks for the suggestion.

Although maybe I'll have to do it in a follow-on series?  Junio merged
the series to next today, so...I guess I'll just add it to my "header
cleanups" notes.




[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