doing it wrong

Blogging with Class

It’s the little things that count

I made the decision to go with Mercurial for version control on my home machines a while ago and I’ve generally been very pleased it.  It came down to Mercurial or git, both of which are very capable.  But today I was reminded of one of the reasons I went with Mercurial instead of git:

$ git stat
git: 'stat' is not a git-command. See 'git --help'.

Did you mean this?
	status

Here is a case where git knows what I was trying to do, and even told me, but instead of just doing what I asked, it instead tries to change my behavior. Here is how Mercurial handles it:

$ hg stat
M main.m

Since Mercurial knows that the only command it has that begins with stat is the status command, there is no ambiguity and therefore, it can simply infer what I wanted and do it. Obviously git is capable of inferring this as well, since it quite plainly told me what it thought I was trying to do in the error message. But they didn’t take it to the next stage of just doing it like the Mercurial team did.

Dec 07, 2009

Copyright © 2006-2026 Dennis Munsie.