Adam Spiers <[email protected]> writes:
[...]
> Is it really necessary to run pre-commit-hook whilst preparing a
> commit log buffer? Normally that hook is used for validation tests,
> e.g. checking code style or running unit tests, right? So it's enough
> for those to be run when the real commit happens.
Yes.
>
> Obviously prepare-commit-msg needs to be run, and it's arguably a
> missing feature in git that commit --dry-run can't run it, but
> presumably it's trivial to work around that shortcoming by running it
> manually?
Yes. But there are others: we don't take care of the commit.template git
config, and probably some more.
One of our goals was to not do all this by hand, but to let git do
it. By using git, we even implement feature not yet in git: they will be
available at once, when git will have them.
Mmm, I've perhaps one interesting solution: we can run
EDITOR=/bin/false git commit
git gererate the .git/COMMIT_EDITMSG, and we can use it to do watever is
needed. I will have to test this.
>
>> Note also that if emacsclient bother you so much, there is already what
>> is needed for magit to not run it:
>>
>> (setq magit-emacsclient-executable nil)
>
> Really? "git grep magit-emacsclient-executable" in my magit repo
> yields no matches, nor does my running emacs have any awareness of
> that variable.
strange, here, with a55e3f5402529d9b96b7c360eb6fdcbf61da49f3, I have
% git grep magit-emacsclient-executable
magit.el:(defcustom magit-emacsclient-executable
magit.el: (concat magit-emacsclient-executable
magit.el: (and magit-emacsclient-executable
magit.el: (unless magit-emacsclient-executable
magit.el: (error "Cannot %s when `magit-emacsclient-executable' is nil"
action))
It's relatively recent, on of the several fix uses for the problems due
to this change.
--
Rémi Vanicat
--
---
You received this message because you are subscribed to the Google Groups
"magit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.