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

3 messages, 2 authors, 2021-01-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2021-01-15 01:50:56

Emily Shaffer [off-list ref] writes:
On Fri, Jan 08, 2021 at 11:22:23AM -0800, Junio C Hamano wrote:
quoted
* 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.
Thanks.
 	# 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?

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

From: Taylor Blau <hidden>
Date: 2021-01-15 02:25:19

On Thu, Jan 14, 2021 at 05:50:08PM -0800, Junio C Hamano wrote:
Emily Shaffer [off-list ref] writes:
quoted
 	# start registers the repo
-	git config --get --global maintenance.repo "$(pwd)" &&
+	pwd >expect &&
+	git config --get --global maintenance.repo >actual &&
+	test_cmp expect actual &&
quoted
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

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

From: Taylor Blau <hidden>
Date: 2021-01-15 02:45:17

On Thu, Jan 14, 2021 at 09:24:17PM -0500, Taylor Blau wrote:
I'm not Stolee, but isn't this what 'git config --fixed-value' is for?
My apologies: Emily suggested this in her original patch and I
completely read past it. I do think that this is better than repeating
pwd >expect, git config >actual, test_cmp expect actual over and over,
but credit where it's due.

Thanks,
Taylor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help