Re: [PATCH v3] git-send-email: Respect core.hooksPath setting

2 messages, 2 authors, 2021-03-24 · open the first message on its own page

Re: [PATCH v3] git-send-email: Respect core.hooksPath setting

From: Junio C Hamano <hidden>
Date: 2021-03-23 22:41:35

Ævar Arnfjörð Bjarmason  [off-list ref] writes:
From: Robert Foss <redacted>

get-send-email currently makes the assumption that the
'sendemail-validate' hook exists inside of the repository.

Since the introduction of 'core.hooksPath' configuration option in
867ad08a261 (hooks: allow customizing where the hook directory is,
2016-05-04), this is no longer true.

Instead of assuming a hardcoded repo relative path, query
git for the actual path of the hooks directory.

Signed-off-by: Robert Foss <redacted>
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---

Here's a v3 that fixes various issues with Robert's v2. Range-diff &
updated patch below.

The advice I had in the v1 feedback about GetHooksPath was bad, just
having it be a new accessor is better. It's not like anyone is calling
this in a loop.
How urgent is this "fix".  I am wondering if Emily's "git hook"
automatically fix this for us when it comes.

Re: [PATCH v3] git-send-email: Respect core.hooksPath setting

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-03-24 00:47:46

On Tue, Mar 23 2021, Junio C Hamano wrote:
Ævar Arnfjörð Bjarmason  [off-list ref] writes:
quoted
From: Robert Foss <redacted>

get-send-email currently makes the assumption that the
'sendemail-validate' hook exists inside of the repository.

Since the introduction of 'core.hooksPath' configuration option in
867ad08a261 (hooks: allow customizing where the hook directory is,
2016-05-04), this is no longer true.

Instead of assuming a hardcoded repo relative path, query
git for the actual path of the hooks directory.

Signed-off-by: Robert Foss <redacted>
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---

Here's a v3 that fixes various issues with Robert's v2. Range-diff &
updated patch below.

The advice I had in the v1 feedback about GetHooksPath was bad, just
having it be a new accessor is better. It's not like anyone is calling
this in a loop.
How urgent is this "fix".  I am wondering if Emily's "git hook"
automatically fix this for us when it comes.
We've had iterations of that topic for almost a year now (since 2019
counting RFC discussions).

While I'd like to see it land I'm skeptical of parts of that approach[1]
and expect we'll have more re-rolls of it, and in any case the conflict
in send-email[2] will be trivial to resolve. So I think it makes sense
to queue up this narrow fix and not have this wait on the larger topic.

1. https://lore.kernel.org/git/87mtv8fww3.fsf@evledraar.gmail.com/
2. https://lore.kernel.org/git/20210311021037.3001235-36-emilyshaffer@google.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help