motemen / git-vim
- Source
- Commits
- Network (33)
- Issues (12)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
-
Comments
-
Comments
-
Loving the plugin, but when I try to create a commit message from within vim I get the new buffer, I fill out my commit message, and it finishes with:
"COMMIT_EDITMSG" 1L, 76C [w]But the commit doesn't take place. When I run git status I have the same changes/etc.
Any hints or any ideas to track? From the code it looks like the post write hook should work fine.
Comments
-
With current HEAD of git-vim (73a1817), hitting "enter" to add files while viewing :GitStatus output doesn't work. Just yields this error for me:
Error detected while processing function GitAdd..GitDoCommand..<SNR>16_SystemGit: line 1: E484: Can't open file /var/folders/mh/mhvu4vHPGiGR1PpCmIscX++++TI/-Tmp-/v868250/10Not sure what other info might help troubleshoot this one. I'm running MacVim 7.2 stable 1.2 (33.3) on Mac OS X 10.5.6 and Git 1.6.3.
Comments
-
When editing commit messages set filetype to "gitcommit"?
2 comments Created 7 months ago by wincentAny chance of automatically setting the filetype to "gitcommit" when editing a commit message in a Vim buffer (triggered by :GitCommit)? (That is, ":setlocal filetype=gitcommit").
At least with my version of Vim -- that is, MacVim 7.2 stable 1.2 (33.3) -- Tim Pope's Git files (http://www.tpope.net/vim-git-announcement) came included, which means that a commit message has syntax colouring, highlighting of errors, autowrapping to 72 columns etc. I've also got Tim Pope's files in /usr/share/vim/vim72/, so I guess they come standard with the version of Vim that ships with Mac OS X leopard anyway.
As far as I can telling, setting the filetype to "gitcommit" on systems which don't have Tim's runtime files has no ill effects.
Comments
In case you want to cherry pick this one I've made the change in my fork, along with a few other tweaks to :GitCommit.
See this commit:
wincent/git-vim@ebe889096fb642dc26d12296176f6965428ebf5b
-
Use BufDelete or similar instead of BufWritePost in :GitCommit
2 comments Created 7 months ago by wincentWhen writing a lengthy commit message you might want to save the buffer occasionally out of habit, but if you do you'll find that a commit takes place and your half-written commit message got included.
To avoid this, I think it would be a good idea if the BufWritePost autocmd in the :GitCommit implementation were changed to BufDelete or similar.
It would also match the behaviour of the command line when you have EDITOR=vim (or any other editor) in your environment and do a "git commit": the actual commit is only processed when you exit the editor, not when you save the message.
Comments
If you want to cherry pick, the suggested change is here:
wincent/git-vim@a5a8264bf1bb90ae80732b877708c9d5097b1d9c
-
Using -s or --signoff with :GitCommit is a pain
1 comment Created 7 months ago by wincentSuggested fix here:
wincent/git-vim@fc3ad49663e92ecabf1246a8ce33031fbcab49fa
Comments
-
:GitCommit mangles paragraphs in commit messages
1 comment Created 7 months ago by wincentSuggested fix here:
wincent/git-vim@46fc53cef65ae948a13ec5f0d13a2ff77501c4f2
Comments
-
Hi
Tho GetGitDir() seems to return a path ending in /
- let lines = readfile(git_dir . 'HEAD') + let lines = readfile(git_dir . '/HEAD') - execute printf('%s %sCOMMIT_EDITMSG', g:git_command_edit, git_dir) + execute printf('%s %s/COMMIT_EDITMSG', g:git_command_edit, git_dir)(stupid formatting - you get the point ;)
patches are required for this to work.
Would you mind looking into this?
Thanks for the good work :)
Comments
-
If you're editing a file inside a submodule :Git* is acted upon the main repository rather than the submodule. So :GitBlame says things are not commited, and :GitStatus reports the status of the main repo.
Comments
-
pull.
Comments
-
looks like the pwd is left as the .git directory,
adding in "cd .." before "execute printf("autocmd BufWritePost" within GitCommit() sorted this for now,
Comments




