Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

.git doesn't imply git executable #477

Closed
coke opened this Issue · 9 comments

5 participants

@coke
Owner

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

@jkeenan
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
@coke
Owner
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)
@Whiteknight

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.

@coke
Owner

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
@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.

@leto
Owner

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

@leto
Owner

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

@rurban
Collaborator

Me

@rurban
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

@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.