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

Commit

Permalink
Fixed the path to .git directory. git rev-parse --git-dir does not ad…
Browse files Browse the repository at this point in the history
…d the trailing "/"
  • Loading branch information
amjith committed May 20, 2009
1 parent 73a1817 commit 4421506
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/git.vim
Expand Up @@ -43,8 +43,8 @@ endfunction
function! GitBranch()
let git_dir = <SID>GetGitDir()

if strlen(git_dir) && filereadable(git_dir . 'HEAD')
let lines = readfile(git_dir . 'HEAD')
if strlen(git_dir) && filereadable(git_dir . '/HEAD')
let lines = readfile(git_dir . '/HEAD')
return len(lines) ? matchstr(lines[0], '[^/]*$') : ''
else
return ''
Expand Down

0 comments on commit 4421506

Please sign in to comment.