Gcommit: extract ticket number from branch name
This commit is contained in:
parent
dd6066ddb7
commit
7ffc7365df
@ -1,5 +1,6 @@
|
||||
" Stefans gitcommit-filetype-plugin
|
||||
|
||||
" add branch name to commit message
|
||||
nnoremap <buffer> gcc :execute 'normal i'.fugitive#head()<CR>A:
|
||||
nnoremap <buffer> ccc :Gcommit<CR>:execute 'normal i'.fugitive#head()<CR>A:
|
||||
" add branch name to commit message, replace 'feature/DLCPRO-1234-abc' by 'DLCPRO-1234'
|
||||
nnoremap <buffer> gcc :execute 'normal i'.substitute(fugitive#head(), '\%(.*/\)*\([^-]\+-\d*\).*', '\1', '')<CR>A:
|
||||
nnoremap <buffer> ccc :Gcommit<CR>:execute 'normal i'.substitute(fugitive#head(), '\%(.*/\)*\([^-]\+-\d*\).*', '\1', '')<CR>A:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user