Skip to content

Commit b43fe3d

Browse files
committed
vitalizer: fix --hash
Git will start in the current working directory if --work-tree option is not given.
1 parent 4d1d157 commit b43fe3d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

autoload/vitalizer.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function! s:check_system() abort
4141
endfunction
4242

4343
function! s:git(cmd) abort
44-
let cmd = printf('git --git-dir "%s" %s', s:git_dir(), a:cmd)
44+
let cmd = printf('git --git-dir "%s" --work-tree "%s" %s', s:git_dir(), g:vitalizer#vital_dir, a:cmd)
4545
let output = system(cmd)
4646
if v:shell_error
4747
throw "vitalizer: '" . cmd . "' failed: ".output

0 commit comments

Comments
 (0)