Git development
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>,
	Adam Dinwoodie <adam@dinwoodie.org>
Subject: Re: [PATCH v4] setup: fix hash algorithm detection
Date: Mon, 23 Nov 2026 22:13:11 +0000	[thread overview]
Message-ID: <awS6dogRASLU3OVx@fruit.crustytoothpaste.net> (raw)
In-Reply-To: <xmqq4id7bjmb.fsf@gitster.g>

[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]

On 2026-11-23 at 16:25:16, Junio C Hamano wrote:
> "brian m. carlson" <sandals@crustytoothpaste.net> writes:
> 
> > +test_expect_success 're-init does not modify hash from config' '
> > +	test_when_finished "rm -rf repo" &&
> > +	(
> > +		sane_unset GIT_DEFAULT_HASH &&
> > +		for algo in sha1 sha256
> > +		do
> > +			if test "$algo" = sha1
> > +			then
> > +				other=sha256
> > +			else
> > +				other=sha1
> > +			fi &&
> > +			git init --object-format="$algo" repo &&
> > +			test_config_global init.defaultObjectFormat "$other" &&
> > +			git init repo &&
> > +			echo "$algo" >expect &&
> > +			git -C repo rev-parse --show-object-format >actual &&
> > +			test_cmp expect actual &&
> > +			rm -fr repo || exit 1
> > +		done
> > +	)
> > +'
> 
> error: bug in the test script: test_when_finished does nothing in a subshell
> not ok 62 - re-init does not modify hash from config
> 
> I think it is test_config_global that is getting complained.  Perhaps
> something along this line would fix it.

I'll do a reroll.  That only triggers on bash and I use dash as /bin/sh.
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA
Speaking for myself only

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 325 bytes --]

  reply	other threads:[~2026-11-23 22:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 16:50 Default object format for new repositories in Git v3 Adam Dinwoodie
2026-11-06 20:46 ` brian m. carlson
2026-11-08  1:16 ` [PATCH] setup: default hash algo to GIT_HASH_DEFAULT brian m. carlson
2026-11-08  4:42   ` Junio C Hamano
2026-11-08 14:38     ` brian m. carlson
2026-11-08 18:22   ` Junio C Hamano
2026-11-09  2:21     ` Junio C Hamano
2026-11-09  9:54       ` Patrick Steinhardt
2026-11-13 22:17   ` [PATCH v2] setup: fix hash algorithm detection brian m. carlson
2026-11-14  0:16     ` Junio C Hamano
2026-11-16  6:22     ` Patrick Steinhardt
2026-11-19  1:06   ` [PATCH v3] " brian m. carlson
2026-11-19  9:52     ` Patrick Steinhardt
2026-11-19 16:26     ` Junio C Hamano
2026-11-19 16:38     ` Junio C Hamano
2026-11-19 22:20       ` brian m. carlson
2026-11-19 23:06         ` Junio C Hamano
2026-11-23  1:14   ` [PATCH v4] " brian m. carlson
2026-11-23  2:29     ` Junio C Hamano
2026-11-23 16:14     ` Junio C Hamano
2026-11-23 16:25     ` Junio C Hamano
2026-11-23 22:13       ` brian m. carlson [this message]
2026-11-24  0:01         ` Junio C Hamano
2026-11-24 22:59   ` [PATCH v5] " brian m. carlson

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=awS6dogRASLU3OVx@fruit.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=adam@dinwoodie.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ps@pks.im \
    /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