Skip to content
This repository

.git doesn't imply git executable #477

Closed
coke opened this Issue July 19, 2011 · 9 comments

5 participants

Will Coleda Duke Leto Reini Urban James E Keenan Andrew Whitworth
Will Coleda
Owner
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.

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

James E Keenan
Owner

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/Manifest.pm:399:\\B\\.git\\b
./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:

./lib/Parrot/Git/Describe.pm
./lib/Parrot/Harness/Smoke.pm
./lib/Parrot/SHA1.pm
Will Coleda
Owner
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
Owner

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
Owner
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
Owner

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
Owner

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

Duke Leto
Owner

"This" being the check_for_git_binary_gh477 branch https://github.com/parrot/parrot/tree/check_for_git_binary_gh477

Reini Urban
Collaborator

Me

Reini Urban
Collaborator

Test ok and merged with cabb13d

Smoked ok on win32 with .git and without git binary, and on linux ditto.
http://smolder.parrot.org/app/projects/report_details/32919

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.