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

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
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 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.