File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 45
45
" Ignore the remote branches. If you don't want information about them, this can
46
46
" make things works faster.
47
47
"
48
+ " let g:git_branch_check_write=<something>
49
+ " Check the current branch if it's the same branch where the file was loaded,
50
+ " before saving the file.
51
+ "
48
52
" If you want to make your own customizations, you can use the GitBranchInfoTokens()
49
53
" function. It returns an array with the current branch as the first element and
50
54
" another array with the other branches as the second element, like:
@@ -67,7 +71,10 @@ let b:git_dir = ""
67
71
let b: git_load_branch = " "
68
72
69
73
autocmd BufEnter * call GitBranchInfoInit ()
70
- autocmd BufWriteCmd * call GitBranchInfoWriteCheck ()
74
+
75
+ if exists (" g:git_branch_check_write" )
76
+ autocmd BufWriteCmd * call GitBranchInfoWriteCheck ()
77
+ endif
71
78
72
79
function GitBranchInfoCheckGitDir ()
73
80
return exists (" b:git_dir" ) && ! empty (b: git_dir )
You can’t perform that action at this time.
0 commit comments