-my $git = $ENV{GIT_EXEC_PATH};
-unless (defined $git) {
- for (path) {
- my $g = catfile $_, 'git';
- if (-x $g) {
- $git = $g;
- last;
- }
- }
-}
-croak "Couldn't find any valid git executable" unless defined $git;
-
-my $root = $ENV{GIT_DIR};
-$root = cwd unless defined $root;
-