Web lists-archives.com

Re: [PATCH 0/11] jk/loose-object-cache sha1/object_id fixups




On Wed, Jan 09, 2019 at 02:42:28PM -0800, Stefan Beller wrote:

> On Wed, Jan 9, 2019 at 1:37 PM Stefan Beller <sbeller@xxxxxxxxxx> wrote:
> >
> > > > Yikes, the conflicts with sb/more-repo-in-api is quite irritating.
> > > > I think I'll postpone the later parts of this series and ask this to
> > > > be sent after sb/more-repo-in-api matures a bit mroe.
> > >
> > > There were several conflicts, but it was mostly just tedious textual
> > > fixups. I pushed the result to:
> > >
> > >   https://github.com/peff/git.git resolve-oid-more-repo
> > >
> > > But I'm happy to wait and rebase if sb/more-repo-in-api is close to
> > > graduating.
> >
> > The merge looks good to me, though I just looked quickly.
> > The series itself is also a pleasant read.
> 
> Compiling this leads to:
> 
> sha1-file.c:1424:33: error: incompatible pointer types passing 'const
> struct object_id *' to parameter of type 'const unsigned char *'
> [-Werror,-Wincompatible-pointer-types]
>         if ((p = has_packed_and_bad(r, repl)) != NULL)
>                                        ^~~~
> ./packfile.h:149:95: note: passing argument to parameter 'sha1' here
> extern const struct packed_git *has_packed_and_bad(struct repository
> *r, const unsigned char *sha1);

Eek, sorry about that. I did the merge on a detached HEAD, and my
config.mak relaxes compilation warnings in that case (since I am often
sight-seeing to old versions that have warnings which have since been
fixed). And the result passes the tests since "repl" and "repl->hash"
are effectively the same pointer.

I've pushed up the fix (s/repl/repl->hash/). Thanks for noticing.

-Peff