Hop,

2018-08-30 16:45 GMT+02:00 Ævar Arnfjörð Bjarmason <ava...@gmail.com>:

>> Solution:
>> We discussed this at work and we thought about making a .d directory
>> for the hooks, eg.  $GIT_DIR/hooks/post-commit.d, where a user can put
>> the post-commit hooks in. This allows us to provide post commit hooks
>> and allows the user to add additional hooks him/herself. We could
>> implement this in our own code base. But we were wondering if this
>> approach could be shared with the git community and if this behavior
>> is wanted in git itself.
>
> There is interest in this. This E-Mail of mine gives a good summary of
> prior discussions about this:
> https://public-inbox.org/git/877eqqnq22....@evledraar.gmail.com/
>
> I.e. it's something I've personally been interested in doing in the
> past, there's various bolt-on solutions to do it (basically local hook
> runners) used by various projects.

Thank you for the input. Do you by any chance still have that branch?
Or would you advise me to start fresh, if so, do you have any pointers
on where to look as I'm brand new to the git source code?

>From the thread I've extracted three stories:

1) As a developer I want to have 'hooks.multiHooks' to enable
multi-hook support in git
Input is welcome for another name.

2) As a developer I want natural sort order executing for my githooks
so I can predict executions
See 
https://public-inbox.org/git/CACBZZX6AYBYeb5S4nEBhYbx1r=icJ81JGYBx5=h4wacphhj...@mail.gmail.com/
for more information

3) As a developer I want to run $GIT_DIR/hooks/<hook> before
$GIT_DIR/hooks/<hook>.d/*
Reference: 
https://public-inbox.org/git/cacbzzx6j6q2dun_z-pnent1u714dvnpfbrl_pieqylmczlu...@mail.gmail.com/

The following story would be.. nice to have I think. I'm not sure I
would want to implement this from the get go as I don't have a use
case for it.
4) As a developer I want a way to have a hook report an error and let
another hook decide if we want to pass or not.
Reference: 
https://public-inbox.org/git/xmqq60v4don1....@gitster.mtv.corp.google.com/


2018-08-31 5:16 GMT+02:00 Jonathan Nieder <jrnie...@gmail.com>:
> A few unrelated thoughts, to expand on this.
>
> Separately from that, in [1] I mentioned that I want to revamp how
> hooks work somewhat, to avoid the attack described there (or the more
> common attack also described there that involves a zip file).  Such a
> revamp would be likely to also handle this multiple-hook use case.
>
> [1] 
> https://public-inbox.org/git/20171002234517.gv19...@aiede.mtv.corp.google.com/

The zip file attack vector doesn't change with adding a hook.d
directory structure? If I have one file or multiple files, the attack
stays the same?
I think I'm asking if this would be a show stopper for the feature.


Cheers,
Wesley

-- 
Wesley Schwengle, Developer
Mintlab B.V., https://www.zaaksysteem.nl
E: wes...@mintlab.nl
T:  +31 20 737 00 05

Reply via email to