.git doesn't imply git executable #477

coke opened this Issue Jul 20, 2011 · 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.

Originally http://trac.parrot.org/parrot/ticket/2160


Some data:

$ find ./lib/Parrot -type f ! -path '*/.git*' | xargs grep -n '\.git'
./lib/Parrot/Distribution.pm:221:    my @ignore_dirs = qw{ .git };
./lib/Parrot/Git/Describe.pm:31:    if ( -d '.git') {
./lib/Parrot/Harness/Smoke.pm:165:    # check for local-modifications if -d .git and query to continue
./lib/Parrot/Harness/Smoke.pm:166:    if (-d ".git") {
./lib/Parrot/Manifest.pm:72:        next if $filename =~ m[/\.git|^blib|^ports];
./lib/Parrot/Manifest.pm:366:    my $gitignore = `cat .gitignore| grep -v '^#'`;
./lib/Parrot/Manifest.pm:373:         # .gitignore has different regexen than MANIFEST
./lib/Parrot/Manifest.pm:398:# Ignore the .git directory
./lib/Parrot/SHA1.pm:29:    if ( -d '.git') {
./lib/Parrot/Test.pm:507:            # Let 'make clean' and '.gitignore' take care of them.
./lib/Parrot/Test.pm:711:        # 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 Dec 13, 2012
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 https://github.com/parrot/parrot/tree/check_for_git_binary_gh477

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 Dec 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment