On Wed, 07 Dec 2011 14:13:13 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote: > On Wed, 07 Dec 2011 21:42:33 +0200, Jani Nikula <jani@nikula.org> wrote: > > I wonder, though, whether the samples should be created only when > > creating the database, or whenever the hooks directory does not exist? > > The latter, I guess. Otherwise existing notmuch users would hardly get > > the sample hooks. > > I agree, the later would be better. notmuch new should just create the > hooks directory (and example scripts) if they don't already exist. +1 > > I also think it's nice to have the scripts not executable to begin with, > and the hook runner only executes the script if they are executable. If the hooks are named as 'pre-new.sample' and 'post-new.sample' and executable then users need just copy the file and start editing (and not remember to do any chmod's)... ... this is the way it seems to be in .git/hooks -- I tested copy -- permission bits seems to follow (filtered by umask). > jamie. Tomi