Speed up is_git_command() by adding a faster check for internal commands

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>