dblume commited on 2023-06-18 18:58:13
Showing 1 changed files, with 5 additions and 5 deletions.
... | ... |
@@ -226,11 +226,11 @@ function! GitDiff() |
226 | 226 |
exec ':tabnew | silent r! git show ' . l:hash . '^:$(git rev-parse --show-prefix)' . shellescape(l:fname) |
227 | 227 |
setl buftype=nofile |
228 | 228 |
0d_ |
229 |
- exec 'silent :file git show '.l:hash .'^:' . l:fname |
|
229 |
+ exec 'silent :file ' . fnameescape('git show '.l:hash .'^:'.l:fname) |
|
230 | 230 |
|
231 | 231 |
exec 'vne | silent r! git show ' . l:hash . ':$(git rev-parse --show-prefix)' . shellescape(l:fname) |
232 | 232 |
setl buftype=nofile |
233 |
- exec 'silent :file git show '.l:hash.':' . l:fname |
|
233 |
+ exec 'silent :file ' . fnameescape('git show '.l:hash.':'.l:fname) |
|
234 | 234 |
0d_ |
235 | 235 |
else |
236 | 236 |
" If the buffer is not different then repo, then diff HEAD vs file's previous commit |
... | ... |
@@ -243,7 +243,7 @@ function! GitDiff() |
243 | 243 |
exec ':tabnew | r! git show ' . l:commit . ':$(git rev-parse --show-prefix)' . l:fname |
244 | 244 |
setl buftype=nofile |
245 | 245 |
0d_ |
246 |
- exec 'silent :file git show '.l:commit.':' . l:fname |
|
246 |
+ exec 'silent :file ' . fnameescape('git show '.l:commit.':'.l:fname) |
|
247 | 247 |
exec 'vert sb '.l:buf |
248 | 248 |
endif |
249 | 249 |
windo diffthis |
... | ... |
@@ -258,9 +258,9 @@ function! GitLog() |
258 | 258 |
if stridx(l:fname, ' -- ') != -1 |
259 | 259 |
let l:fname = split(l:fname, ' -- ')[-1] |
260 | 260 |
endif |
261 |
- let l:bufname = 'git log1 -- ' . l:fname |
|
261 |
+ let l:bufname = 'git log -- ' . l:fname |
|
262 | 262 |
if !ShowBufInNewTab(l:bufname) |
263 |
- exec 'tabnew | r! git log1 -- ' . shellescape(l:fname) |
|
263 |
+ exec 'tabnew | r! git log --no-color --graph --date=short --pretty="format:\%h \%ad \%s \%an \%d" -- ' . shellescape(l:fname) |
|
264 | 264 |
setl buftype=nofile |
265 | 265 |
0d_ |
266 | 266 |
exec 'silent :file ' . fnameescape(l:bufname) |
267 | 267 |