git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Derrick Stolee <stolee@gmail.com>
Date
Jan 15, 2021, 02:36 UTC
Message-ID
<15237c6c-98eb-0d1f-e6d5-2dda91c0ce09@gmail.com>
In-Reply-To
<YADOf41CcaRuToD7@google.com>
On 1/14/2021 6:06 PM, Emily Shaffer wrote:
Show 23 quoted lines
> On Fri, Jan 08, 2021 at 11:22:23AM -0800, Junio C Hamano wrote:
>> * ds/maintenance-part-4 (2021-01-05) 4 commits
>>   (merged to 'next' on 2021-01-08 at 1f98c859ea)
>>  + maintenance: use Windows scheduled tasks
>>  + maintenance: use launchctl on macOS
>>  + maintenance: include 'cron' details in docs
>>  + maintenance: extract platform-specific scheduling
>>
>>  Follow-up on the "maintenance part-3" which introduced scheduled
>>  maintenance tasks to support platforms whose native scheduling
>>  methods are not 'cron'.
>>
>>  Will merge to 'master'.
> 
> This series again has troubles running inside a directory with regex
> metachars in the path. Courtesy of Jonathan Nieder, I think this fix
> matches the intent a little better; but if we don't like this, the same
> lines could be diffed just to add --fixed-value instead.
> 
> 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.

This appears to be a case of mixing up the order in which these submissions came into place. js/t7900-protect-pwd-in-config-get added --fixed-value, but that was simultaneous with ds/maintenance-part-4 which added more tests in this vein without including --fixed-value.

Looking at the history, ds/maintenance-part-4 doesn't have js/t7900-protect-pwd-in-config-get in its history, which is probably why you don't include --fixed-value in your patch.

Perhaps it would be better to have a --fixed-value patch on top of the merge that combines the two topics?

> -- >8 --
> Subject: [PATCH] maintenace: explicitly test value of maintenance.repo
s/maintenace/maintenance/
Show 5 quoted lines
> Make t7900-maintenance.sh easier to debug by printing and checking the
> value of maintenance.repo rather than using a search string. Since only
> one maintenance.repo is configured, this is fine; in the event that
> multiple maintenance.repo are configured during the test, instead the
> directory under test should be provided along with '--fixed-value'.

Here you mention --fixed-value as if you plan to use it. I'm all for that plan.

Show 17 quoted lines
> Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
> ---
>  t/t7900-maintenance.sh | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
> index 2e0c8a4c31..0edad63227 100755
> --- a/t/t7900-maintenance.sh
> +++ b/t/t7900-maintenance.sh
> @@ -487,7 +487,9 @@ test_expect_success 'start and stop macOS maintenance' '
>  	GIT_TEST_MAINT_SCHEDULER=launchctl:./print-args git maintenance start &&
>  
>  	# start registers the repo
> -	git config --get --global maintenance.repo "$(pwd)" &&
> +	pwd >expect &&
> +	git config --get --global maintenance.repo >actual &&
> +	test_cmp expect actual &&
Sorry again, but this (and others) would probably be better as
+	git config --get --global --fixed-value maintenance.repo "$(pwd)" &&

Thanks, -Stolee

Previous: Taylor BlauNext: Derrick Stolee
Message 25 of 34 in “What's cooking in git.git (Jan 2021, #02; Fri, 8)”
  1. Junio C HamanoJan 8, 2021
  2. Ævar Arnfjörð BjarmasonJan 9, 2021
  3. Junio C HamanoJan 9, 2021
  4. brian m. carlsonJan 9, 2021
  5. Junio C HamanoJan 9, 2021
  6. brian m. carlsonJan 11, 2021
  7. Junio C HamanoJan 11, 2021
  8. Ævar Arnfjörð BjarmasonJan 12, 2021
  9. Emily ShafferJan 14, 2021
  10. Emily ShafferJan 14, 2021
  11. Junio C HamanoJan 15, 2021
  12. brian m. carlsonJan 15, 2021
  13. Junio C HamanoJan 15, 2021
  14. Ævar Arnfjörð BjarmasonJan 16, 2021
  15. Jeff KingJan 17, 2021
  16. Ævar Arnfjörð BjarmasonJan 17, 2021
  17. Ævar Arnfjörð BjarmasonJan 10, 2021
  18. Junio C HamanoJan 11, 2021
  19. David AguilarJan 9, 2021
  20. Junio C HamanoJan 9, 2021
  21. Emily ShafferJan 14, 2021
  22. Junio C HamanoJan 15, 2021
  23. Taylor BlauJan 15, 2021
  24. Taylor BlauJan 15, 2021
  25. Derrick StoleeJan 15, 2021
  26. Derrick StoleeJan 15, 2021
  27. Junio C HamanoJan 15, 2021
  28. Junio C HamanoJan 15, 2021
  29. Derrick StoleeJan 15, 2021
  30. Junio C HamanoJan 15, 2021
  31. Emily ShafferJan 15, 2021
  32. Junio C HamanoJan 15, 2021
  33. Jeff KingJan 15, 2021
  34. Junio C HamanoJan 15, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.