2 ms·
And checking for master should be done like this: test "master" == "$(git rev-parse --abbrev-ref HEAD)" And probably not by grep'ing the output of symbolic-
by js2 16y ago
And checking for master should be done like this:
test "master" == "$(git rev-parse --abbrev-ref HEAD)"
And probably not by grep'ing the output of symbolic-ref.
Again, for stuff like this, take a look at git itself. Some fairly major parts of it (such as rebase) are still shell scripts, and the stuff that's once was shell scripts can be found in git.git/contrib/examples