Re: [PATCH 09/13] t: add lib-loose.sh
- From
Jeff King <peff@peff.net>
- Date
- May 19, 2025, 06:17 UTC
- Message-ID
- <20250519061753.GB102701@coredump.intra.peff.net>
- In-Reply-To
- <aCcK4bZVxuO2iTMS@pks.im>
On Fri, May 16, 2025 at 11:52:33AM +0200, Patrick Steinhardt wrote:
Show 14 quoted lines
> > +++ b/t/lib-loose.sh
> > @@ -0,0 +1,30 @@
> > +# Support routines for hand-crafting loose objects.
> > +
> > +# Write a loose object into the odb at $1, with object type $2 and contents
> > +# from stdin. Writes the oid to stdout. Example:
> > +#
> > +# oid=$(echo foo | loose_obj .git/objects blob)
> > +#
> > +loose_obj () {
>
> Nit: I would have called this `write_loose_obj ()` to indicate that it's
> writing an object. But ultimately doesn't matter too much, so please
> feel free to ignore this comment.I named it this way to match "pack_obj" in lib-pack.sh. But that one is probably my doing, too, and arguably both should be named write_foo_obj(). ;)
For such a little corner of the test suite I agree it probably doesn't matter too much.
-Peff