Problems using perl's Git.pm module

6 messages, 3 authors, 2016-06-15 · open the first message on its own page

Problems using perl's Git.pm module

From: Josef Wolf <hidden>
Date: 2016-06-15 22:50:09

Hello folks,

I am trying to use perl's Git.pm module, but for some reason, it keeps
bailing out:

  jw@raven:~/testrepos> git st
  # On branch master
  nothing to commit (working directory clean)
  
  jw@raven:~/testrepos> ./test.pl
  # On branch master
  nothing to commit (working directory clean)
  status failed w/ code 1 at ./test.pl line 9
  
  jw@raven:~/testrepos> cat test.pl
  #! /usr/bin/perl
  
  use strict;
  use warnings;
  use Git;
  
  my $repo = Git->repository (Directory => '.');
  git_cmd_try { $repo->command_noisy('status') }
                       '%s failed w/ code %d';
  
  print "Never reach this line\n";
  
  jw@raven:~/testrepos> 

Any ideas why the status command keeps bailing out on an entire clean
repository?

Re: Problems using perl's Git.pm module

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:50:09

On Thu, Dec 2, 2010 at 12:40, Josef Wolf [off-list ref] wrote:
I am trying to use perl's Git.pm module, but for some reason, it keeps
bailing out:
Why are you using it? It's for internal use only.

Couldn't you use one of the Perl Git wrappers on the CPAN?

Re: Problems using perl's Git.pm module

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:50:09

Ævar Arnfjörð Bjarmason wrote:
On Thu, Dec 2, 2010 at 12:40, Josef Wolf [off-list ref] wrote:
quoted
I am trying to use perl's Git.pm module, but for some reason, it keeps
bailing out:
Why are you using it? It's for internal use only.
Where do you get that from?  (Not sure whether it's true, just curious.)
Couldn't you use one of the Perl Git wrappers on the CPAN?
This is still a reasonable suggestion, certainly.

Re: Problems using perl's Git.pm module

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:50:09

On Thu, Dec 2, 2010 at 17:19, Jonathan Nieder [off-list ref] wrote:
Ævar Arnfjörð Bjarmason wrote:
quoted
On Thu, Dec 2, 2010 at 12:40, Josef Wolf [off-list ref] wrote:
quoted
quoted
I am trying to use perl's Git.pm module, but for some reason, it keeps
bailing out:
Why are you using it? It's for internal use only.
Where do you get that from?  (Not sure whether it's true, just curious.)
It, like our internal C is subject to change at any time. It's not
intended for external use.
quoted
Couldn't you use one of the Perl Git wrappers on the CPAN?
This is still a reasonable suggestion, certainly.
Yes, it really is much better to use the CPAN modules that wrap
Git. We might even want to use them ourselves someday.

Re: Problems using perl's Git.pm module

From: Josef Wolf <hidden>
Date: 2016-06-15 22:50:09

On Thu, Dec 02, 2010 at 02:23:32PM +0100, Ævar Arnfjörð Bjarmason wrote:
On Thu, Dec 2, 2010 at 12:40, Josef Wolf [off-list ref] wrote:
quoted
I am trying to use perl's Git.pm module, but for some reason, it keeps
bailing out:
Why are you using it?
1. It is always available whenever git is available, so I don't need to
   search/install additional packages just to hack some scripts. If you
   have to support multiple distros/OS'es, it starts getting a PITA to
   find out what/how to install those additional packages.

2. Since it is used by the core developers, I assumed that it would be
   more robust than some third-party wrappers.

3. Since it is bundled with git, I'd not expect any version mismatches.
   With a third-party wrapper, version mismatches are much more likely.
Couldn't you use one of the Perl Git wrappers on the CPAN?
Which one would you suggest?

Re: Problems using perl's Git.pm module

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:50:09

Josef Wolf wrote:
On Thu, Dec 02, 2010 at 02:23:32PM +0100, Ævar Arnfjörð Bjarmason wrote:
quoted
Couldn't you use one of the Perl Git wrappers on the CPAN?
Which one would you suggest?
Judging from [1], Git::Wrapper might be worth trying.

That said, if you have more questions or any ideas for Git.pm, they
would be welcome.  That is when the lack of declared stable API can
come in handy. ;-)

[1] https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools#Perl
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help