Marius Vollmer <[email protected]> writes:

[...]

> What about running git twice for a commit?  Once to run all the pre-
> hooks and prepare the commit message, and a second time to actually do
> the commit, without running any pre-hooks?
>
> This seems to produce the commit message in "foo"
>
>   EDITOR=/bin/cat git commit >foo

the bin/cat editor won't be available on all computer (think
windows). That said I won't be surprised if cat was part of all windows
git distribution, we only have to find it.

 This is why I prefer to use the /this/path/do/no/exist editor, that do
exists nowhere, and always let the message in .git/COMMIT_MGS, (but that
break somehow with my vcsh bindings... But it's another problem). 

(One a side note: we need to send github message here, I feel like
speaking to mostly the same people on different channel, and it some
time fail to contact some of them)

But those detail aside, I like this solution.

Jonas proposed solution (use some waiting pseudo editor, a spoke of it
there: https://github.com/magit/magit/issues/801#issuecomment-23566863)
Could also be a solution, but as the emacsclient solution, it lock git
and magit in mid commit state.

> and "--no-verify" can be used to skip the pre-commit hook on the actual
> commit, if that is desired.

Mmm, if we didn't lock staging and other git operation while editing the
commit message, I tend to believe that hooks have to be run again.

-- 
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.

Reply via email to