[PATCH v3 0/2] notmuch hooks
Tomi Ollila
tomi.ollila at iki.fi
Thu Dec 8 00:49:43 PST 2011
On Wed, 07 Dec 2011 14:13:13 -0800, Jameson Graef Rollins <jrollins at finestructure.net> wrote:
> On Wed, 07 Dec 2011 21:42:33 +0200, Jani Nikula <jani at 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
More information about the notmuch
mailing list