From: Junio C Hamano Date: Thu, 12 Mar 2026 22:03:41 GMT Subject: Re: [PATCH] t0410: modernize delete_object helper Message-ID: In-Reply-To: <20260312203337.GA2552877@coredump.intra.peff.net> Jeff King writes: > On Thu, Mar 12, 2026 at 06:20:30PM +0530, Siddharth Shrimali wrote: > >> 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. Yes, and another thing that was pointed out is it is dubious to use test_path_is_file here, as "rm" would be loud enough when it fails.