Re: [PATCH v3] bugreport: collect list of populated hooks
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 7, 2020, 23:06 UTC
- Message-ID
- <xmqqa72j2vmh.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20200507210849.GH77802@google.com>
Emily Shaffer <emilyshaffer@google.com> writes:
Show 6 quoted lines
>> 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.
Show 12 quoted lines
>> + 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).
Show 6 quoted lines
>> git bugreport -s hooks && >> grep applypatch-msg git-bugreport-hooks.txt && >> ! grep prepare-commit-msg git-bugreport-hooks.txt >> -- >> 2.26.2-447-gd61d20c9b4 >>
Thanks.