Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit efea017

Browse files
committed
improve "^ref:" match
1 parent d1ac1f7 commit efea017

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎autoload/gitbranch.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
" Filename: autoload/gitbranch.vim
33
" Author: itchyny
44
" License: MIT License
5-
" Last Change: 2014/05/08 22:04:24.
5+
" Last Change: 2014/05/09 13:05:42.
66
" =============================================================================
77

88
let s:save_cpo = &cpo
@@ -11,7 +11,7 @@ set cpo&vim
1111
function! gitbranch#name()
1212
if has_key(b:, 'gitbranch_path')
1313
let branch = get(readfile(b:gitbranch_path), 0, '')
14-
if branch =~# '^ref'
14+
if branch =~# '^ref: '
1515
return substitute(branch, '^ref: \%(refs/\%(heads/\|remotes/\|tags/\)\=\)\=', '', '')
1616
elseif branch =~# '^\x\{20\}'
1717
return branch[:6]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /