diff -r fad896292e7d -r 891aaa7c0c70 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Wed Dec 10 23:46:47 2014 -0500 +++ b/mercurial/cmdutil.py Sun Nov 09 19:57:02 2014 -0500 @@ -2197,14 +2197,14 @@ if date: opts['date'] = util.parsedate(date) message = logmessage(ui, opts) + matcher = scmutil.match(repo[None], pats, opts) # extract addremove carefully -- this function can be called from a command # that doesn't support addremove if opts.get('addremove'): - scmutil.addremove(repo, pats, opts) - - return commitfunc(ui, repo, message, - scmutil.match(repo[None], pats, opts), opts) + scmutil.addremove(repo, matcher, opts) + + return commitfunc(ui, repo, message, matcher, opts) def amend(ui, repo, commitfunc, old, extra, pats, opts): # amend will reuse the existing user if not specified, but the obsolete