If they run outside of a git repo, then this will return 'fatal: Not a git repository (or any of the parent directories): .git'. We could check the `v:shell_error` to make sure we are safe, else fall back to the current directory:

``` vim
function! GitErDone()
  let git_root = system('git rev-parse --show-toplevel')
  if v:shell_error
    return '.'
  else
    return git_root
  endif
endfunction
```