Re: What's cooking in git.git (Jan 2021, #02; Fri, 8)
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jan 15, 2021, 02:24 UTC
- Message-ID
- <YAD80TFOn0EX24wb@nand.local>
- In-Reply-To
- <xmqqsg73ufxr.fsf@gitster.c.googlers.com>
On Thu, Jan 14, 2021 at 05:50:08PM -0800, Junio C Hamano wrote:
Show 13 quoted lines
> Emily Shaffer <emilyshaffer@google.com> 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