diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-11-23 02:52:03 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-11-23 02:54:06 -0600 |
commit | a071bfe5018f7877f46c71a184ecd55133bd1805 (patch) | |
tree | a2c6c6d16cfdc034950fc6a4f80e6c4fc8bfbd6f /vimrc | |
parent | 8e08ed43389c6497a7ae09413b48425fdeb143ac (diff) | |
download | conf-a071bfe5018f7877f46c71a184ecd55133bd1805.tar.gz conf-a071bfe5018f7877f46c71a184ecd55133bd1805.zip |
allow dc macro to work from subdirectories in a git repository
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -386,7 +386,10 @@ function s:vcs_orig(file) elseif finddir('_darcs', dir . ';') =~ '_darcs' return system('darcs show contents ' . a:file) elseif finddir('.git', dir . ';') =~ '.git' - return system('git show HEAD:' . a:file) + let prefix = system('git rev-parse --show-prefix') + let prefix = substitute(prefix, '\n', '', 'g') + let cmd = 'git show HEAD:'.prefix.a:file + return system(cmd) else throw 'No VCS directory found' endif |