Let "hg add" do nothing

Matt Mackall mpm at selenic.com
Mon Aug 20 21:00:30 CDT 2007


On Tue, Aug 21, 2007 at 03:22:53AM +0200, Markus F.X.J. Oberhumer wrote:
> Benoit Boissinot wrote:
> > On 8/15/07, Steffen Kaiser <skhg at smail.inf.fh-bonn-rhein-sieg.de> wrote:
> >> Hello,
> >>
> >> is there a way to let have
> >>
> >> $ hg add
> >>
> >> (no arguments)
> >>
> >> do nothing, but display the help or something harmless like that?
> >>
> >> The default of "If no names are given, add all files in the repository."
> >> really bugs me.
> >>
> > This has come up before with revert. The behaviour was changed to not
> > revert anything if --all isn't passed.
> > One difference between revert and add, is that revert is non-destructive.
> 
> Adding a lot of files by mistake (e.g if shell tab completion has not inserted 
> anything because of ambiguities) is very annoying, so +2 from my side for 
> requiring args for "hg add" and "hg addremove".

You don't get to vote +2!

I really don't understand why people are typing "hg add<enter>" and
being surprised when it adds stuff. Do they also run reboot to get
help on the various ways of rebooting?

And if you're the type of wreckless maniac who types "hg
add<tab><enter>" without even waiting to see what <tab> gave you, you
might want to consider cutting back on the coffee.

It's going to take a significantly better use case than these to
convince me to break backward compatibility, folks.

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial mailing list