Git development
 help / color / mirror / Atom feed
* running git from non-standard location on Mac
@ 2013-02-21  9:48 James French
  2013-02-21 10:35 ` Konstantin Khomoutov
  0 siblings, 1 reply; 4+ messages in thread
From: James French @ 2013-02-21  9:48 UTC (permalink / raw)
  To: git@vger.kernel.org

Hi,

I wonder if someone could help me. I installed git on a Mac and then I copied the install somewhere else (which I do want to do, trust me).  I'm now having trouble with git svn. I'm getting "Can't locate Git/SVN.pm in @INC..."

I've added the bin folder to PATH. What else do I need to do? Do I need to use -exec-path=/MyPathToGit/libexec/git-core? How do I change the content of @INC?

Apologies if this is a dumb question, I'm not much of a unix man.

Cheers,
James

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: running git from non-standard location on Mac
  2013-02-21  9:48 running git from non-standard location on Mac James French
@ 2013-02-21 10:35 ` Konstantin Khomoutov
  2013-02-21 10:53   ` Matthieu Moy
  2013-02-21 11:48   ` James French
  0 siblings, 2 replies; 4+ messages in thread
From: Konstantin Khomoutov @ 2013-02-21 10:35 UTC (permalink / raw)
  To: James French; +Cc: git@vger.kernel.org

On Thu, 21 Feb 2013 09:48:36 +0000
James French <James.French@naturalmotion.com> wrote:

> I wonder if someone could help me. I installed git on a Mac and then
> I copied the install somewhere else (which I do want to do, trust
> me).  I'm now having trouble with git svn. I'm getting "Can't locate
> Git/SVN.pm in @INC..."
> 
> I've added the bin folder to PATH. What else do I need to do? Do I
> need to use -exec-path=/MyPathToGit/libexec/git-core? How do I change
> the content of @INC?
> 
> Apologies if this is a dumb question, I'm not much of a unix man.

`git svn` is implemented in Perl (which is supposedly bundled with your
Git package, but I'm not sure), and "SVN.pm" is a Perl module (a
library written in Perl, ".pm" stands for "Perl Module").

@INC is an internal variable used by Perl to locate its modules.
Its contents is partially inferred from the Perl's installation
location and partially from the environment.

This [1] should help you get started with affecting @INC.

1. http://stackoverflow.com/a/2526809/720999

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: running git from non-standard location on Mac
  2013-02-21 10:35 ` Konstantin Khomoutov
@ 2013-02-21 10:53   ` Matthieu Moy
  2013-02-21 11:48   ` James French
  1 sibling, 0 replies; 4+ messages in thread
From: Matthieu Moy @ 2013-02-21 10:53 UTC (permalink / raw)
  To: Konstantin Khomoutov; +Cc: James French, git@vger.kernel.org

Konstantin Khomoutov <flatworm@users.sourceforge.net> writes:

> This [1] should help you get started with affecting @INC.

In the particular case of Git, the Makefile hardcodes the path to the
Git library. The script git-svn in Git's exec-path should start with:

use lib (split(/:/, $ENV{GITPERLLIB} || "/some/hardcoded/path/to/perl/5.10.1"));

Setting the $GITPERLLIB environment variable or editing the script to
let the hardcoded path point to the place where the Git.pm file is
should do it.


But I still have to wonder why you didn't build Git with the right paths
in the first place.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: running git from non-standard location on Mac
  2013-02-21 10:35 ` Konstantin Khomoutov
  2013-02-21 10:53   ` Matthieu Moy
@ 2013-02-21 11:48   ` James French
  1 sibling, 0 replies; 4+ messages in thread
From: James French @ 2013-02-21 11:48 UTC (permalink / raw)
  To: Konstantin Khomoutov; +Cc: git@vger.kernel.org



-----Original Message-----
From: Konstantin Khomoutov [mailto:flatworm@users.sourceforge.net] 
Sent: 21 February 2013 10:35
To: James French
Cc: git@vger.kernel.org
Subject: Re: running git from non-standard location on Mac

On Thu, 21 Feb 2013 09:48:36 +0000
James French <James.French@naturalmotion.com> wrote:

> I wonder if someone could help me. I installed git on a Mac and then I 
> copied the install somewhere else (which I do want to do, trust me).  
> I'm now having trouble with git svn. I'm getting "Can't locate 
> Git/SVN.pm in @INC..."
> 
> I've added the bin folder to PATH. What else do I need to do? Do I 
> need to use -exec-path=/MyPathToGit/libexec/git-core? How do I change 
> the content of @INC?
> 
> Apologies if this is a dumb question, I'm not much of a unix man.

`git svn` is implemented in Perl (which is supposedly bundled with your Git package, but I'm not sure), and "SVN.pm" is a Perl module (a library written in Perl, ".pm" stands for "Perl Module").

@INC is an internal variable used by Perl to locate its modules.
Its contents is partially inferred from the Perl's installation location and partially from the environment.

This [1] should help you get started with affecting @INC.

1. http://stackoverflow.com/a/2526809/720999



Thanks for the help guys. I got it working using --exec-path and PERL5LIB environment variable. But Matthieu is right, I should build it from source to do it properly.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-21 11:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-21  9:48 running git from non-standard location on Mac James French
2013-02-21 10:35 ` Konstantin Khomoutov
2013-02-21 10:53   ` Matthieu Moy
2013-02-21 11:48   ` James French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox