Skip to content

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() function! GitBranch()
let git_dir = <SID>GetGitDir() let git_dir = <SID>GetGitDir()


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

0 comments on commit 4421506

Please sign in to comment.