Re: [PATCH] t0410: modernize delete_object helper
- From
Jeff King <peff@peff.net>
- Date
- Mar 12, 2026, 20:33 UTC
- Message-ID
- <20260312203337.GA2552877@coredump.intra.peff.net>
- In-Reply-To
- <20260312125030.7799-1-r.siddharth.shrimali@gmail.com>
On Thu, Mar 12, 2026 at 06:20:30PM +0530, Siddharth Shrimali wrote:
Show 8 quoted lines
> delete_object () {
> - rm $1/.git/objects/$(echo $2 | sed -e 's|^..|&/|')
> + repo=$1
> + obj=$2
> + path="$repo/.git/objects/$(test_oid_to_path $obj)" &&
> + test_path_is_file "$path" &&
> + rm "$path"
> }It might worth marking these new variables with "local". They are not used elsewhere by the script currently, but they are common enough names that a collision in the future doesn't seem that unlikely.
-Peff