Skip to content
This repository

.git doesn't imply git executable #477

coke opened this Issue July 19, 2011 · 9 comments

5 participants

Will Coleda Duke Leto Reini Urban James E Keenan Andrew Whitworth
Will Coleda
coke commented July 19, 2011

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.


James E Keenan

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:

Will Coleda
coke commented July 20, 2011
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)
Andrew Whitworth

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.

Will Coleda
coke commented May 13, 2012

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.

Duke Leto

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.

Duke Leto

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

Duke Leto

"This" being the check_for_git_binary_gh477 branch

Reini Urban


Reini Urban

Test ok and merged with cabb13d

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

Reini Urban rurban closed this December 13, 2012
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.