From bc6ac15fc5a1575a7e4f1f882ea411b301cd253a Mon Sep 17 00:00:00 2001 From: Christian Ebert Date: Thu, 17 Jun 2010 17:18:24 +0200 Subject: [PATCH] vcshg: correct message for empty commit --- plugin/vcshg.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/vcshg.vim b/plugin/vcshg.vim index ac6cb4f..2c616c0 100644 --- a/plugin/vcshg.vim +++ b/plugin/vcshg.vim @@ -131,7 +131,11 @@ endfunction " Function: s:hgFunctions.Commit(argList) {{{2 function! s:hgFunctions.Commit(argList) - return s:DoCommand('commit -v -l "' . a:argList[0] . '"', 'commit', '', {}) + try + return s:DoCommand('commit -v -l "' . a:argList[0] . '"', 'commit', '', {}) + catch /Version control command failed.*nothing changed/ + echomsg 'No commit needed.' + endtry endfunction " Function: s:hgFunctions.Delete() {{{2 -- 2.11.4.GIT