1

I installed this Perl Module Git::Repository from cpan , i am using strawberry Perl v5.28.1 .

when i am trying the following :

use Git::Repository;
$r = Git::Repository->new( work_tree => 'C:\Users\dave\Documents\my_test\.git' );
#$r->run( add => '.' );
#$r->run( commit => '-m', 'my commit message' );

i get the below error message :

Warning: unable to close filehandle GEN11 properly: Bad file descriptor at C:/Strawberry/perl/site/lib/Git/Repository/Command.pm line 95.
Warning: unable to close filehandle GEN7 properly: Bad file descriptor at C:/Strawberry/perl/site/lib/Git/Repository/Command.pm line 95.
Warning: unable to close filehandle GEN26 properly: Bad file descriptor at C:/Strawberry/perl/site/lib/Git/Repository.pm line 198.
Warning: unable to close filehandle GEN22 properly: Bad file descriptor at C:/Strawberry/perl/site/lib/Git/Repository.pm line 198.
Warning: unable to close filehandle GEN41 properly: Bad file descriptor at C:/Strawberry/perl/site/lib/Git/Repository.pm line 198.
Warning: unable to close filehandle GEN37 properly: Bad file descriptor at C:/Strawberry/perl/site/lib/Git/Repository.pm line 198.
Warning: unable to close filehandle GEN56 properly: Bad file descriptor at C:/Strawberry/perl/site/lib/Git/Repository.pm line 198.
Warning: unable to close filehandle GEN52 properly: Bad file descriptor at C:/Strawberry/perl/site/lib/Git/Repository.pm line 198.
Warning: unable to close filehandle GEN71 properly: Bad file descriptor at C:/Strawberry/perl/site/lib/Git/Repository.pm line 198.
Warning: unable to close filehandle GEN67 properly: Bad file descriptor at C:/Strawberry/perl/site/lib/Git/Repository.pm line 198.
Warning: unable to close filehandle GEN86 properly: Bad file descriptor at C:/Strawberry/perl/site/lib/Git/Repository.pm line 198.
Warning: unable to close filehandle GEN82 properly: Bad file descriptor at C:/Strawberry/perl/site/lib/Git/Repository.pm line 198.

any idea/help?

larsks
  • 277,717
  • 41
  • 399
  • 399
dave
  • 867
  • 1
  • 5
  • 11
  • 1
    The first thing I notice is that the value you've provided for `work_tree` isn't a work tree. Remove the `.git` part of the path: `C:\Users\dave\Documents\my_test` (or use the `git_dir` option instead of `work_dir`). See https://metacpan.org/pod/Git::Repository for docs and examples. – larsks Mar 11 '21 at 02:25
  • both of the options provides the same result :( – dave Mar 11 '21 at 10:33

0 Answers0