Subject: Re: What's cooking in git.git (Jan 2021, #02; Fri, 8)

From: Taylor Blau <[email-masked]>
Date: Thu, 14 Jan 2021 21:24:17 -0500

On Thu, Jan 14, 2021 at 05:50:08PM -0800, Junio C Hamano wrote:
> Emily Shaffer <[email-masked]> writes:
> >  	# start registers the repo
> > -	git config --get --global maintenance.repo "$(pwd)" &&
> > +	pwd >expect &&
> > +	git config --get --global maintenance.repo >actual &&
> > +	test_cmp expect actual &&
>
> > Before this patch, the test said "Is there something configured in
> > maintenance.repo that looks like $PWD?" and after this patch, the test
> > says, "Does the config in maintenance.repo look like $PWD?" - so it is
> > not quite semantically identical but I think may be clearer.
>
> Sounds sensible.  Derrick (CC'ed), thoughts?

I'm not Stolee, but isn't this what 'git config --fixed-value' is for?
ISTM that what is written here (writing the cwd into 'expect', and then
comparing it to the value of maintenance.repo) is correct, but I think
it may be unnecessarily verbose.

I.e., wouldn't the following do the trick?

-	git config --get --global maintenance.repo "$(pwd)" &&
+	git config --get --fixed-value --global maintenance.repo "$(pwd)" &&

Thanks,
Taylor