Ignore rev-parse warnings

This commit is contained in:
Tim Pope
2011-02-26 13:45:24 -05:00
parent ca4e18c81f
commit 95311ab2d9

View File

@@ -254,8 +254,8 @@ endfunction
function! s:repo_rev_parse(rev) dict abort function! s:repo_rev_parse(rev) dict abort
let hash = self.git_chomp('rev-parse','--verify',a:rev) let hash = self.git_chomp('rev-parse','--verify',a:rev)
if hash =~ '^\x\{40\}$' if hash =~ '\<\x\{40\}$'
return hash return matchstr(hash,'\<\x\{40\}$')
endif endif
call s:throw('rev-parse '.a:rev.': '.hash) call s:throw('rev-parse '.a:rev.': '.hash)
endfunction endfunction