git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] t0410: modernize delete_object helper

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 13, 2026, 15:19 UTC
Message-ID
<xmqqecln92q9.fsf@gitster.g>
In-Reply-To
<20260313025852.30010-1-r.siddharth.shrimali@gmail.com>
Siddharth Shrimali <r.siddharth.shrimali@gmail.com> writes:
Show 19 quoted lines
>  t/t0410-partial-clone.sh | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh
> index 2a5bdbeeb8..d36d1c3a5f 100755
> --- a/t/t0410-partial-clone.sh
> +++ b/t/t0410-partial-clone.sh
> @@ -11,7 +11,10 @@ test_description='partial clone'
>  GIT_TEST_COMMIT_GRAPH=0
>  
>  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"
>  }
>  
>  pack_as_from_promisor () {
Please do not forget to run test-lint.
    $ make -C t test-lint
If you did so, you would have been told

t0410-partial-clone.sh:14: error: quote "$val" in 'local var=$val': local repo=$1 t0410-partial-clone.sh:15: error: quote "$val" in 'local var=$val': local obj=$2

Squash this in, perhaps?
diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh
index d36d1c3a5f..52e19728a3 100755
--- a/t/t0410-partial-clone.sh
+++ b/t/t0410-partial-clone.sh
@@ -11,8 +11,8 @@ test_description='partial clone'
 GIT_TEST_COMMIT_GRAPH=0
 
 delete_object () {
-	local repo=$1
-	local obj=$2
+	local repo="$1"
+	local obj="$2"
 	local path="$repo/.git/objects/$(test_oid_to_path "$obj")" &&
 	rm "$path"
 }
-- 
2.53.0-713-g4f09e58cf8
Previous: Junio C Hamano
Message 13 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. Junio C HamanoMar 13, 2026
  10. Jeff KingMar 18, 2026
  11. t0410: modernize delete_object helperSiddharth Shrimali, Mar 13, 2026
  12. Junio C HamanoMar 13, 2026
  13. Junio C HamanoMar 13, 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.