Re: [PATCH 06/16] hash.h: move some oid-related declarations from cache.h

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

 



On Thu, Feb 23, 2023 at 6:08 AM Derrick Stolee <derrickstolee@xxxxxxxxxx> wrote:
>
> On 2/23/2023 3:05 AM, Elijah Newren via GitGitGadget wrote:
> > From: Elijah Newren <newren@xxxxxxxxx>
> >
> > These defines and enum are all oid-related and as such seem to make
> > more sense being included in hash.h.  Further, moving them there
> > allows us to remove some includes of cache.h in other files.
>
>
> > diff --git a/line-log.h b/line-log.h
> > index 82ae8d98a40..adff361b1bc 100644
> > --- a/line-log.h
> > +++ b/line-log.h
> > @@ -5,6 +5,7 @@
> >
> >  struct rev_info;
> >  struct commit;
> > +struct string_list;
> >
> >  /* A range [start,end].  Lines are numbered starting at 0, and the
> >   * ranges include start but exclude end. */
>
> This hunk seems unrelated to the current patch. Perhaps misplaced?

Yeah, I can see how it might be surprising, but this is necessary.
line-log.h includes diffcore.h, which prior to this patch included
cache.h, which includes the kitchen sink.  With this patch, diffcore.h
stopped including cache.h, and suddenly line-log.h has some 'struct
string_list *' parameters to functions that the compiler will complain
about.  Adding a forward declaration fixes it.



[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