public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Siddharth Shrimali <r.siddharth.shrimali@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, sunshine@sunshineco.com,
	pushkarkumarsingh1970@gmail.com, christian.couder@gmail.com,
	karthik.188@gmail.com
Subject: Re: [PATCH v2] t0410: modernize delete_object helper
Date: Fri, 13 Mar 2026 00:58:25 -0400	[thread overview]
Message-ID: <20260313045825.GC3753825@coredump.intra.peff.net> (raw)
In-Reply-To: <20260313025852.30010-1-r.siddharth.shrimali@gmail.com>

On Fri, Mar 13, 2026 at 08:28:52AM +0530, Siddharth Shrimali wrote:

>  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

  reply	other threads:[~2026-03-13  4:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12 12:50 [PATCH] t0410: modernize delete_object helper Siddharth Shrimali
2026-03-12 14:17 ` Pushkar Singh
2026-03-12 19:05 ` Eric Sunshine
2026-03-12 19:09   ` Junio C Hamano
2026-03-12 20:33 ` Jeff King
2026-03-12 22:03   ` Junio C Hamano
2026-03-13  2:58 ` [PATCH v2] " Siddharth Shrimali
2026-03-13  4:58   ` Jeff King [this message]
2026-03-13 15:29     ` Junio C Hamano
2026-03-18  2:37       ` Jeff King
2026-03-13  5:31   ` [PATCH v3] " Siddharth Shrimali
2026-03-13 15:20     ` Junio C Hamano
2026-03-13 15:19   ` [PATCH v2] " Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260313045825.GC3753825@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=karthik.188@gmail.com \
    --cc=pushkarkumarsingh1970@gmail.com \
    --cc=r.siddharth.shrimali@gmail.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox