News for hackers. Stuff that matters.
Re:Git quick statistics by Waterluvian on Monday December 17, 2018 @05:14PM (#18702738)
So I installed and use `git open`. How do these applications get to work, prefaced by `git`? Wouldn't `git quick-stats` just invoke `git` with an invalid parameter?
Re:Git quick statistics by smarinov on Monday December 17, 2018 @05:21PM (#18702794)
When you installed it, `make` changed your global .gitconfig file and added the respective Git aliases to it, so that Git would know what to do and not complain about invalid commands.

This happens on this line of the project's Makefile: https://github.com/arzzen/git-quick-stats/blob/master/Makefi...

Re:Git quick statistics by Waterluvian on Monday December 17, 2018 @05:28PM (#18702842)
Aha. So this is possible because git is designed for these kinds of aliases. I wasn't sure if maybe it was core to Linux or something. Thank you.
Re:Git quick statistics by erik_seaberg on Monday December 17, 2018 @05:19PM (#18702777)

  $ cat >~/bin/git-foo
  echo foo!
  $ chmod +x ~/bin/git-foo
  $ git foo
  foo!
  $ git help foo
  No manual entry for git-foo
Re:Git quick statistics by zimpenfish on Tuesday December 18, 2018 @04:35AM (#18705463)
Aside from aliases in your `.gitconfig`, as far as I know, if `git-subcommand` exists in your path, `git subcommand` will call that script for you automatically.

ie if you put `git-monkey` in `$HOME/bin`, add `$HOME/bin` to your path, now `git monkey` is a valid subcommand.