gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] Re: Patch : precomimt hook


From: Ethan Benson
Subject: Re: [Gnu-arch-users] Re: Patch : precomimt hook
Date: Sat, 4 Oct 2003 00:17:57 -0800
User-agent: Mutt/1.3.28i

On Fri, Oct 03, 2003 at 05:38:25AM -0500, Mark A. Flacy wrote:
> >>>>> "Ethan" == Ethan Benson <address@hidden> writes:
> Ethan> 
> Ethan> i mean that he should implement a generic pre-hook.  one where command
> Ethan> line args, environment variables etc are provided, and the user
> Ethan> writing the hook would implement a pre-commit by adding a case for 
> Ethan> $1 == commit.
> 
> I take this to mean that you'd prefer not only an ~/.arch-params/hook file
> but an ~/.arch-params/pre-hook[1] file.  If you are going to go that route,
> then perhaps ~/.arch-params/hook should be split into
> ~/.arch-params/pre-hook and ~/.arch-params/post-hook.

well arch-params/hook is already a post-hook.  

but yes im in favor of a pre version of the current hook, not a hodge
podge of hacks implementing foocmd-hook, barcmd-hook blah blah.

> I'm not crazy about such a split, but can see some arguments in favor of it.

well perhaps a pre-invoke verison of the hook could be done still
using .arch-params/hook, but doing so would probably break everyones
existing hooks since they are not written to expect pre-invoke.

> Ethan> the current hook system allows hooks for more then just the commit
> Ethan> command, the proposed patch is a specific hack only for commit.
> 
> The proposed patch requires you to add a $1 == precommit line in your
> ~/.arch-params/hook file.  That's scarcely onerous, obscure, or remarkably
> different from the other hooks. 

yuk.

i think its a far better design to just exec .arch-params/pre-hook in
the exact same manner as .arch-params/hook, the only difference being
pre-hook is invoked before the command returns, instead of after.

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgp7haZC99zli.pgp
Description: PGP signature


reply via email to

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