We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8118dc1 commit 8dc9134Copy full SHA for 8dc9134
autoload/gitbranch.vim
@@ -2,7 +2,7 @@
2
" Filename: autoload/gitbranch.vim
3
" Author: itchyny
4
" License: MIT License
5
-" Last Change: 2015年02月26日 00:34:03.
+" Last Change: 2021年08月20日 23:05:12.
6
" =============================================================================
7
8
let s:save_cpo = &cpo
@@ -26,6 +26,7 @@ endfunction
26
function! gitbranch#dir(path) abort
27
let path = a:path
28
let prev = ''
29
+ let git_modules = path =~# '/\.git/modules/'
30
while path !=# prev
31
let dir = path . '/.git'
32
let type = getftype(dir)
@@ -36,6 +37,8 @@ function! gitbranch#dir(path) abort
36
37
if reldir =~# '^gitdir: '
38
return simplify(path . '/' . reldir[8:])
39
endif
40
+ elseif git_modules && isdirectory(path.'/objects') && isdirectory(path.'/refs') && getfsize(path.'/HEAD') > 10
41
+ return path
42
43
let prev = path
44
let path = fnamemodify(path, ':h')
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments