Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.

Don't include trailing slash in b:git_dir #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugin/git.vim
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function! s:GetGitDir()
if !exists('b:git_dir')
let b:git_dir = s:SystemGit('rev-parse --git-dir')
if !v:shell_error
let b:git_dir = fnamemodify(split(b:git_dir, "\n")[0], ':p') . '/'
let b:git_dir = fnamemodify(split(b:git_dir, "\n")[0], ':p')
endif
endif
return b:git_dir
Expand Down Expand Up @@ -149,7 +149,7 @@ function! GitCommit(args)
let $EDITOR = editor_save

let cur_dir = getcwd()
execute printf('%s %sCOMMIT_EDITMSG', g:git_command_edit, git_dir)
execute printf('%s %s/COMMIT_EDITMSG', g:git_command_edit, git_dir)
execute printf("lcd %s", cur_dir)

setlocal filetype=git-status bufhidden=wipe
Expand Down