diff --git a/hgext3rd/githelp.py b/hgext3rd/githelp.py --- a/hgext3rd/githelp.py +++ b/hgext3rd/githelp.py @@ -67,7 +67,7 @@ Usage: hg githelp -- ''' - if len(args) == 0: + if len(args) == 0 or (len(args) == 1 and args[0] =='git'): raise error.Abort(_('missing git command - ' 'usage: hg githelp -- ')) diff --git a/tests/test-githelp.t b/tests/test-githelp.t --- a/tests/test-githelp.t +++ b/tests/test-githelp.t @@ -21,6 +21,16 @@ githelp on a single command should succeed $ hg githelp -- commit hg commit + $ hg githelp -- git commit + hg commit + +githelp should fail nicely if we don't give it arguments + $ hg githelp + abort: missing git command - usage: hg githelp -- + [255] + $ hg githelp -- git + abort: missing git command - usage: hg githelp -- + [255] githelp on a command with options should succeed $ hg githelp -- commit -pm "abc"