Hacker News new | ask | show | jobs
by barefootcoder 1040 days ago
Funny, if not helpful, error message:

     pw = getpwuid(getuid());
     if (!pw)
        usage("You don't exist. Go away!");

I find it interesting that originally each command was a separate executable.
2 comments

> I find it interesting that originally each command was a separate executable.

That's actually still the case. `git` is just a wrapper that when called as `git <command>` looks for `git-<command>` under `libexec/git-core/`.

You can add any command named `git-foo` into your PATH and then run it with `git foo`. For example, I have `git-gsr` which is a simple shell script that does a global search and replace in a git repo. I run it as `git gsr <old> <new>`

They could search it in the source so uniqueness was enough.