From 95311ab2d9c3b529663f7967ba5b8f08774476c0 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 26 Feb 2011 13:45:24 -0500 Subject: [PATCH] Ignore rev-parse warnings --- plugin/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index f4aaedf..b052220 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -254,8 +254,8 @@ endfunction function! s:repo_rev_parse(rev) dict abort let hash = self.git_chomp('rev-parse','--verify',a:rev) - if hash =~ '^\x\{40\}$' - return hash + if hash =~ '\<\x\{40\}$' + return matchstr(hash,'\<\x\{40\}$') endif call s:throw('rev-parse '.a:rev.': '.hash) endfunction