[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] Re: Having two precommit hooks

From: Matthieu Moy
Subject: [Gnu-arch-users] Re: Having two precommit hooks
Date: Mon, 11 Oct 2004 08:55:19 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux)

Thomas Lord <address@hidden> writes:

> I can't imagine not wanting to re-run tree-lint after a tree-modifying
> hook ran.  What's wrong with (in essense):
>       #!/bin/sh
>         tla tree-lint
>         run-hook
>         tla commit

This will work when you call it, off course, but this seems to me to
be a dangerous solution if the correctness of your archive really
depends on "run-hook":

1) It is easy to forget about the wrapper script, and run "tla commit"
   by mistake.

2) front-ends to xtla won't be aware of the the wrapper script, and
   will run "tla commit" anyway. For someone using, say, sometimes
   xtla and sometimes fai, this requires a painfull customization.
   (currently, xtla has no precommit hook, so, the user will have to
   write some elisp to achieve that)

So, your solution works, but I think this is much simpler and safer
for the user to have a pre-precommit hook.

By the way, is there a particular reason why there's a post-commit
hook ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]