[PATCH 1/1] git: update to v2.56.0

Christian Hesse list at eworm.de
Tue Sep 29 07:47:17 UTC 2026


John Keeping <john at keeping.me.uk> on Tue, 2026/09/29 00:16:
> Hi Christian,
> 
> On Mon, Sep 28, 2026 at 08:36:43PM +0200, Christian Hesse wrote:
> > diff --git a/ui-blob.c b/ui-blob.c
> > index bc91656..5158de5 100644
> > --- a/ui-blob.c
> > +++ b/ui-blob.c
> > @@ -63,7 +63,7 @@ int cgit_ref_path_exists(const char *path, const char
> > *ref, int file_only) &paths, walk_tree, &walk_tree_ctx);
> >  
> >  done:
> > -	free(path_items.match);
> > +	free((void *)path_items.match);
> >  	return walk_tree_ctx.found_path;
> >  }  
> 
> Can we remove the xstrdup() at the start of the function and the free()
> here?
> 
> These were added in commit 3d33b46 ("git: update to v2.13.4") with the
> comment "... allocate the match string to avoid needing to cast away
> const".
> 
> Now that item.match is const char*, we can use "path" directly.

Ah, sounds reasonable. ;)

Had been wondering why this actually does duplicate... Thanks!
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20260929/5d759388/attachment.sig>


More information about the CGit mailing list