Re: [PATCH] t0410: modernize delete_object helper
- From
Pushkar Singh <pushkarkumarsingh1970@gmail.com>
- Date
- Mar 12, 2026, 14:17 UTC
- Message-ID
- <CALE2CrTzYbMam_fi5HszSUFVZADE1haLtpBqhUmd1ki9biM2hA@mail.gmail.com>
- In-Reply-To
- <20260312125030.7799-1-r.siddharth.shrimali@gmail.com>
Hi Siddharth,
Thanks for the cleanup! Using `test_oid_to_path` here makes the helper cleaner and avoids the `sed` trick.
I tested this patch locally and the tests passed.
One small thought: maybe we could quote `$obj` in the `test_oid_to_path` call, like this:
> > + path="$repo/.git/objects/$(test_oid_to_path $obj)" &&
path="$repo/.git/objects/$(test_oid_to_path "$obj")" &&
Also, would it make sense to use `local` for `repo` and `obj` to avoid leaking variables outside the helper? Not a strong opinion, but it might make the helper a bit safer.
Thanks, Pushkar