Re: [PATCH v2 12/22] tree-diff.c: move S_DIFFTREE_IFXMIN_NEQ define from cache.h
- From
Elijah Newren <newren@gmail.com>
- Date
- May 2, 2023, 05:00 UTC
- Message-ID
- <CABPp-BHymt9COEjnTRTbg_vHa4s6-CL7Bh+9q0PfoiE0SRcRrg@mail.gmail.com>
- In-Reply-To
- <CABPp-BEPy4R1R1X1o1oMs6sEECVjEoLeRXripEi7k8ZO-CrbuA@mail.gmail.com>
On Mon, May 1, 2023 at 6:06 PM Elijah Newren <newren@gmail.com> wrote:
Show 35 quoted lines
> > On Mon, May 1, 2023 at 9:35 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> 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.