Re: Thoughts on adding another hook to git
- From
Nikolai Weibull <now@bitwi.se>
- Date
- Jun 13, 2006, 15:26 UTC
- Message-ID
- <dbfc82860606130826jd9ba61fx26d0b3e42d68c93a@mail.gmail.com>
- In-Reply-To
- <448EB7B6.4020708@shlrm.org>
On 6/13/06, David Kowis <dkowis@shlrm.org> wrote:
> I'm using vim.
Show 12 quoted lines
> 1 # Explicit paths specified without -i nor -o; assuming --only paths...
> 2 #
> 3 # Updated but not checked in:
> 4 # (will commit)
> 5 #
> 6 # modified: mail/abook/DETAILS
> 7 # modified: mail/abook/HISTORY
>
> What I'd like to be able to do is have that "abook" directory name
> automatically added to the top of my commit message before it gets into
> the editor. I can do this with a script (echo ${PWD##*/}) but it'd need
> to be a hook before the editor shows up.autocmd BufRead .git/COMMIT_MSG call setline(1, expand('%:p:h:h:t'))But that will of course do that for all commit-messages, so your point is still valid.
nikolai