News for hackers. Stuff that matters.
Re:Git koans by micampe on Monday April 08, 2013 @12:31PM (#5512704)
> Yes. Otherwise command line scripts will start doing horrible things. It was never intended that you can alias builtins, the only reason you might think you can is because it is allowed in mercurial which I think is a horrible idea.

You should understand what you are responding to before typing your answer.

Say today I create an alias “boom = <whatever>” and next week git introduces a boom command.

Now my alias is ignored, my scripts are broken and I might destroy my working copy or kill my cat by using it without knowing it now means something else.

Git gives some very stupid hints “branhc is not a git command, did you mean branch?” it should also warn me when I defined an invalid alias.

Maybe that alias was valid two versions ago or I just don’t know that command exists, since there are eleventy thousand of them.

Re:Git koans by the_mitsuhiko on Monday April 08, 2013 @12:46PM (#5512819)
> Now my alias is ignored, my scripts are broken and I might destroy my working copy or kill my cat by using it without knowing it now means something else.

Your scripts should not rely on aliases you have in your config. Scripts are intended to be used by different people.

Re:Git koans by micampe on Monday April 08, 2013 @01:07PM (#5512962)
I decide who is intended to use my scripts, thank you. I have many scripts where I am the only user.

Also, the issue of having an alias changing behavior without warning on my command line still exists.

Re:Git koans by salgernon on Monday April 08, 2013 @12:57PM (#5512888)
>> Git gives some very stupid hints “branhc is not a git command, did you mean branch?” it should also warn me when I defined an invalid alias.

This is the thing that really infuriates me - having a message from my tool that tells me there's an error is one thing, but offering a (frequently incorrect) correction forces me stop and try to figure out why this suggestion was offered, since it frequently has NOTHING to do with what I actually (mis)typed.

Lets put it this way - if this autocorrection feature is so great, then it should prompt you Y/N after giving the error message. Would it then be a better feature? Or would it make more people want to stab it in the eyeballs? Or if this suggestion feature is so great, then it should just DWIM in the first place.

Someone needs to take gits levenshtein algorithm away.

Re:Git koans by rson on Monday April 08, 2013 @03:11PM (#5513799)
> Or if this suggestion feature is so great, then it should just DWIM in the first place.

It can do this if you tell it do. The following tells git to wait 10 tenths of a second before executing the corrected command, giving you time to cancel if it is incorrect.

    git config --global help.autocorrect 10