Duy Nguyen <[email protected]> writes:

> I started moving my git work space to multi-worktree and found it
> annoying that every time I add a new worktree, my first step must be
> copy my config.mak over. Room for improvement. I see three options:

4) none of the above.

Everybody should learn to think before uttering post-X hook the
following:

 * Is X an end user initiated action?

 * What does the hypothetical post-X hook need to decide what to do?
   If it needs to change behaviour based on what X did, does it need
   more than what it can get by observing its outcome (i.e. exit
   status and what is left in the working tree and the repository)?

 * Does the hypothetical post-X hook need other end-user supplied
   customization beyond what argument the end user gave to run X?

The answer to these questions would often reveal that post-X hook is
a bad idea and you are much better off with a wrapper script that
runs X as the first thing (and the remainder can do different things
based on the outcome of X if you wanted it to).
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to