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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 14, 2021 at 05:50:08PM -0800, Junio C Hamano wrote:
> Emily Shaffer <emilyshaffer@xxxxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux