Re: [PATCH] fixup! repack: exclude cruft pack(s) from the MIDX where possible

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

 



On Thu, Jun 19, 2025 at 10:07:14AM -0700, Junio C Hamano wrote:
> Carlo Marcelo Arenas Belón <carenas@xxxxxxxxx> writes:
>
> > In a previous commit, `grep -o` was introduced as part of t7704.
> >
> > POSIX doesn't have that flag as defined and while it is a popular
> > one is not available at least in the latest release of AIX.
> >
> > Use a sed equivalent that ought to be more portable.
>
> OK.  The patterns are not exactly the same but as long as we know
> $packdir does *not* contain a substring "pack-", it should be OK.

Good catch; thanks, both.

> As the topic is not even in 'next', perhaps a refresh can squash
> this change in?

Yep, I'll squash this in and adjust the other "grep -o" use in this
series.

> >  		ls $packdir/pack-*.idx | sort >packs.all &&
> > -		grep -o "pack-.*\.idx$" packs.all >in &&
> > +		sed -n "s/.*\(pack-.*\.idx\)$/\1/p" packs.all >in &&
> >  		git multi-pack-index write --stdin-packs --bitmap <in &&
>
> I do not quite see the need for temporary files or "grep/sed" here,
> though.
>
> 		(cd "$packdir" && ls pack-*.idx) |
> 		sort |
> 		git multi-pack-index write --stdin-packs --bitmap &&

The grep/sed is unnecessary (I was just trying to be clever and avoid a
sub-shell), but the packs.all temporary file is still needed since we
run comm against it later on in the test script.

> Tangent to this discussion, but I just noticed that
>
>     $ git multi-pack-index -h
>
> lacks quite a lot of information.  Perhaps it needs updating?

Definitely some good #leftoverbits ;-).

Thanks,
Taylor




[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