[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Re: Re: Having two precommit hooks
From: |
Stephen J. Turnbull |
Subject: |
Re: [Gnu-arch-users] Re: Re: Having two precommit hooks |
Date: |
Tue, 12 Oct 2004 10:16:48 +0900 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chayote, linux) |
>>>>> "Thomas" == Thomas Lord <address@hidden> writes:
Thomas> ? The (made up here) guiding principle being that hooks
Thomas> named after commands are called after the command
Thomas> completes ("commit") and that the last hook called before
Thomas> beginning an archive transaction is the command name
Thomas> prefixed with "pre" ("precommit"), and that if the command
Thomas> operates on a tree and we want a hook that gets first-shot
Thomas> on that tree, that's "prepare-" followed by the command
Thomas> name.
I think that's clear enough, and the names are not inconsistent with
the semantics. Just make sure the principle is clearly and obviously
documented, and honored in the observance, not the breach. ;-)
Emacs hooks don't seem to have such a rule; some hooks that are named
after a command are done before the command executes, some after. But
many commands that change state in an irreversible way (kill-emacs,
write-file) have hooks that are called _before_ the command, so they
can do checking, modify the semantics, etc. I suspect that Emacs
users might tend to expect the commit hook to be called _before_ the
archive transaction is started. Not a good reason to oppose your
proposal principle, but a good reason to document it. :-)
--
Institute of Policy and Planning Sciences http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.
- Re: [Gnu-arch-users] Re: Having two precommit hooks, (continued)
- Re: [Gnu-arch-users] Re: Having two precommit hooks, Thomas Lord, 2004/10/11
- Re: [Gnu-arch-users] Re: Having two precommit hooks, James Blackwell, 2004/10/12
- [Gnu-arch-users] Re: Re: Having two precommit hooks, Anand Kumria, 2004/10/11
- Re: [Gnu-arch-users] Re: Re: Having two precommit hooks, Thomas Lord, 2004/10/11
- Re: [Gnu-arch-users] Re: Re: Having two precommit hooks, Mikhael Goikhman, 2004/10/11
- Re: [Gnu-arch-users] Re: Re: Having two precommit hooks, Thomas Lord, 2004/10/11
- Re: [Gnu-arch-users] Re: Re: Having two precommit hooks,
Stephen J. Turnbull <=
- [Gnu-arch-users] Re: Re: Re: Having two precommit hooks, Anand Kumria, 2004/10/13
- Re: [Gnu-arch-users] Having two precommit hooks, John Meinel, 2004/10/10
- Re: [Gnu-arch-users] Having two precommit hooks, David Allouche, 2004/10/10
- Re: [Gnu-arch-users] Having two precommit hooks, David Allouche, 2004/10/10
- Re: [Gnu-arch-users] Having two precommit hooks, John Meinel, 2004/10/10
- [Gnu-arch-users] tla front-ends, David Allouche, 2004/10/10
- [Gnu-arch-users] Re: tla front-ends, Matthieu Moy, 2004/10/10
- Re: [Gnu-arch-users] tla front-ends, John Meinel, 2004/10/10
- Re: [Gnu-arch-users] Having two precommit hooks, Miles Bader, 2004/10/10
- Re: [Gnu-arch-users] Having two precommit hooks, Miles Bader, 2004/10/10