git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 18:08 UTC

Re: [PATCH v2] t0410: modernize delete_object helper

From
Jeff King <peff@peff.net>
Date
Mar 13, 2026, 04:58 UTC
Message-ID
<20260313045825.GC3753825@coredump.intra.peff.net>
In-Reply-To
<20260313025852.30010-1-r.siddharth.shrimali@gmail.com>
On Fri, Mar 13, 2026 at 08:28:52AM +0530, Siddharth Shrimali wrote:
Show 6 quoted lines
>  delete_object () {
> -	rm $1/.git/objects/$(echo $2 | sed -e 's|^..|&/|')
> +	local repo=$1
> +	local obj=$2
> +	local path="$repo/.git/objects/$(test_oid_to_path "$obj")" &&
> +	rm "$path"
You'll need to write these first two with extra quotes, like:
  local repo="$1"
  local obj="$2"

It is fine without the quotes on most shells, but there are some historical versions that need it (broken dash, according to CodingGuidelines?).

This will be caught by "make test", which runs our check-non-portable-shell script. But that's not run if you're just doing a one-shot ./0410 invocation.

-Peff
Previous: Siddharth ShrimaliNext: Siddharth Shrimali
Message 8 of 13 in “t0410: modernize delete_object helper”
  1. t0410: modernize delete_object helperSiddharth Shrimali, Mar 12, 2026
  2. Pushkar SinghMar 12, 2026
  3. Eric SunshineMar 12, 2026
  4. Junio C HamanoMar 12, 2026
  5. Jeff KingMar 12, 2026
  6. Junio C HamanoMar 12, 2026
  7. t0410: modernize delete_object helperSiddharth Shrimali, Mar 13, 2026
  8. Jeff KingMar 13, 2026
  9. t0410: modernize delete_object helperSiddharth Shrimali, Mar 13, 2026
  10. Junio C HamanoMar 13, 2026
  11. Junio C HamanoMar 13, 2026
  12. Junio C HamanoMar 13, 2026
  13. Jeff KingMar 18, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.