Fix duplicate Signed-off-by lines

Closes #284.
This commit is contained in:
Tim Pope 2012-12-12 22:40:04 -05:00
parent 2723a1116f
commit d63a475fcb

View File

@ -933,7 +933,7 @@ function! s:Commit(args) abort
let error = get(errors,-2,get(errors,-1,'!')) let error = get(errors,-2,get(errors,-1,'!'))
if error =~# '\<false''\=\.$' if error =~# '\<false''\=\.$'
let args = a:args let args = a:args
let args = s:gsub(args,'%(%(^| )-- )@<!%(^| )@<=%(-[se]|--edit|--interactive)%($| )','') let args = s:gsub(args,'%(%(^| )-- )@<!%(^| )@<=%(-[es]|--edit|--interactive|--signoff)%($| )','')
let args = s:gsub(args,'%(%(^| )-- )@<!%(^| )@<=%(-F|--file|-m|--message)%(\s+|\=)%(''[^'']*''|"%(\\.|[^"])*"|\\.|\S)*','') let args = s:gsub(args,'%(%(^| )-- )@<!%(^| )@<=%(-F|--file|-m|--message)%(\s+|\=)%(''[^'']*''|"%(\\.|[^"])*"|\\.|\S)*','')
let args = s:gsub(args,'%(^| )@<=[%#]%(:\w)*','\=expand(submatch(0))') let args = s:gsub(args,'%(^| )@<=[%#]%(:\w)*','\=expand(submatch(0))')
let args = '-F '.s:shellesc(msgfile).' '.args let args = '-F '.s:shellesc(msgfile).' '.args