Skip to content


.git doesn't imply git executable #477

coke opened this Issue · 9 comments

5 participants


On windows, I have "git bash" and "visual studio command shell", and they're separate. When I run 'nmake smoke' (et al.), it's complaining that

'git' is not recognized as an internal....

So, while -d .git is an easy check, we can't assume that is sufficient to be able to run git.



Some data:

$ find ./lib/Parrot -type f ! -path '*/.git*' | xargs grep -n '\.git'
./lib/Parrot/    my @ignore_dirs = qw{ .git };
./lib/Parrot/Git/    if ( -d '.git') {
./lib/Parrot/Harness/    # check for local-modifications if -d .git and query to continue
./lib/Parrot/Harness/    if (-d ".git") {
./lib/Parrot/        next if $filename =~ m[/\.git|^blib|^ports];
./lib/Parrot/    my $gitignore = `cat .gitignore| grep -v '^#'`;
./lib/Parrot/         # .gitignore has different regexen than MANIFEST
./lib/Parrot/ Ignore the .git directory
./lib/Parrot/    if ( -d '.git') {
./lib/Parrot/            # Let 'make clean' and '.gitignore' take care of them.
./lib/Parrot/        # make cleanup and .gitignore more simple

So it appears that the first (though not necessarily the only ) places we have to look at are:

and while those using "git bash" can install git so it's available in
the path, that doesn't help, e.g. tortoisegit users. (I think)

Is there any status on this ticket? This problem is actively impeding me from being able to do some testing on windows, so I would really like to see a solution as soon as possible.


Whiteknight - I ended up avoiding the issue by getting all my command line tools available in the same shell. I think, given the # of windows devs we have, I think this is a reasonable approach.

@leto leto was assigned
Parrot Virtual Machine member

This is my fault. I will modify the code so that it checks for the existence of .git and checks if there is a git binary available before attempting to execute git commands.

Parrot Virtual Machine member

Any volunteers to test this on systems without a git binary and/or Windows?

Parrot Virtual Machine member

"This" being the check_for_git_binary_gh477 branch

Parrot Virtual Machine member


Parrot Virtual Machine member

Test ok and merged with cabb13d

Smoked ok on win32 with .git and without git binary, and on linux ditto.

@rurban rurban closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.