Git development
 help / color / mirror / Atom feed
From: Ben Knoble <ben.knoble@gmail.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH] t1501: don't reassign EMPTY_BLOB and EMPTY_TREE
Date: Tue, 24 Nov 2026 07:51:04 -0500	[thread overview]
Message-ID: <EFAA4505-5C65-4DF2-984C-C3DC07A44124@gmail.com> (raw)
In-Reply-To: <0e64c973-4ad1-4eaa-938e-f9d60418562a@web.de>


> Le 24 nov. 2026 à 04:16, René Scharfe <l.s.r@web.de> a écrit :
> 
> The variables EMPTY_BLOB AND EMPTY_TREE are already set by test-lib.sh,
> so just use them.

Nit: downcase and?

> 
> Signed-off-by: René Scharfe <l.s.r@web.de>
> ---
> t/t1501-work-tree.sh | 2 --
> 1 file changed, 2 deletions(-)
> 
> diff --git a/t/t1501-work-tree.sh b/t/t1501-work-tree.sh
> index 8c94ac2e70..e6f43b0fb8 100755
> --- a/t/t1501-work-tree.sh
> +++ b/t/t1501-work-tree.sh
> @@ -5,8 +5,6 @@ test_description='test separate work tree'
> . ./test-lib.sh
> 
> test_expect_success 'setup' '
> -    EMPTY_TREE=$(git write-tree) &&
> -    EMPTY_BLOB=$(git hash-object -t blob --stdin </dev/null) &&
>    CHANGED_BLOB=$(echo changed | git hash-object -t blob --stdin) &&
>    EMPTY_BLOB7=$(echo $EMPTY_BLOB | sed "s/\(.......\).*/\1/") &&
>    CHANGED_BLOB7=$(echo $CHANGED_BLOB | sed "s/\(.......\).*/\1/") &&
> --
> 2.56.1

Nice simplification. A future reader may wonder what sets those,
but git-grep turns them up.

  reply	other threads:[~2026-11-24 12:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  9:15 [PATCH] t1501: don't reassign EMPTY_BLOB and EMPTY_TREE René Scharfe
2026-11-24 12:51 ` Ben Knoble [this message]
2026-11-25 11:39   ` René Scharfe
2026-11-24 20:29 ` 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=EFAA4505-5C65-4DF2-984C-C3DC07A44124@gmail.com \
    --to=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    /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