Pavel Raiskup <praiskup(a)redhat.com> writes:
> The original code didn't use "-f" so if the file
already existed it
> would not be overwritten (unless I am missing something).
Agree, I missed that. So there is other problem — these hooks are never
used on such system. But I agree that this is unlikely..
That's intentional. Really the hooks are installed automatically just so
that people submitting patches have higher chance of them being correct
on first try. I am fine if this mechanism doesn't work 100% of
time.
> However new code would remove and re-symlink the directory on
each
> invocation so it would be harder to customize (and people might wonder
> why their hooks are being removed all the time..)
Truth but once you start customizing on per-project basis, it is
definitely already a symlink as you tried the try-fedora-review script
before, right? (Then you are also aware of the symlink destination).
This should not result in suprise..
But a developer could add his own local hooks and they would be
removed. Of course he could add them into git-hooks directory directly
but again, all of this might be a bit too surprising. I like to err on
the side of not doing enough than doing too much
--
Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Software Engineer - Developer Experience
PGP: 7B087241
Red Hat Inc.
http://cz.redhat.com