Skip to content

Commit

Permalink
Remove redundant precaution.
Browse files Browse the repository at this point in the history
  • Loading branch information
airblade committed Aug 29, 2013
1 parent 878c342 commit 5a8befd
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions plugin/gitgutter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ endfunction
" Utility {{{

function! s:is_active()
return g:gitgutter_enabled && s:exists_file() && s:is_in_a_git_repo() && s:is_tracked_by_git()
return g:gitgutter_enabled && s:exists_file() && s:is_tracked_by_git()
endfunction

function! s:current_file()
Expand Down Expand Up @@ -112,12 +112,6 @@ function! s:command_in_directory_of_file(cmd)
return substitute(s:cmd_in_dir, "'", '"', 'g')
endfunction

function! s:is_in_a_git_repo()
let cmd = s:escape('git rev-parse' . s:discard_stdout_and_stderr())
call system(s:command_in_directory_of_file(cmd))
return !v:shell_error
endfunction

function! s:is_tracked_by_git()
let cmd = s:escape('git ls-files --error-unmatch' . s:discard_stdout_and_stderr() . ' ' . shellescape(s:file()))
call system(s:command_in_directory_of_file(cmd))
Expand Down

0 comments on commit 5a8befd

Please sign in to comment.