Thread (2 messages) 2 messages, 2 authors, 2020-05-11

Re: [PATCH v3] bugreport: collect list of populated hooks

From: Emily Shaffer <hidden>
Date: 2020-05-11 21:26:58

On Thu, May 07, 2020 at 04:06:14PM -0700, Junio C Hamano wrote:
Emily Shaffer [off-list ref] writes:
quoted
quoted
 test_expect_success 'indicates populated hooks' '
-	test_when_finished rm git-bugreport-hooks.txt &&
-	test_when_finished rm -fr .git/hooks &&
I'm not sure it's necessary to lose these two lines. Especially the
generated bugreport I'd like to clean up.
I do not care either way, actually.  I left it so that it would be
easier to debug the test by looking at the output.
That's a good point, although I was worried about the junk left behind
for other tests. I think I'd rather delete the junk, as people should
still be able to debug the test with "test_pause &&" and see the
contents of the temporary hook directory (verified locally).
quoted
quoted
+	rm -fr .git/hooks &&
 	mkdir .git/hooks &&
-	write_script .git/hooks/applypatch-msg &&
-	write_script .git/hooks/prepare-commit-msg.sample &&
+	for hook in applypatch-msg prepare-commit-msg.sample
+	do
+		write_script ".git/hooks/$hook" <<-\EOF || return 1
+		echo "hook $hook exists"
+		EOF
+	done &&
I like this placeholder script a lot.
I actually don't.  At least the final version should not quote EOF
(otherwise $hook will appear verbatim).
ACK.

New patch inbound as discussed in standup.
 - Emily
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help