From 81a71734bb73c2def1e86de88fb8de9fb6379cc5 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 2 Sep 2006 22:58:48 -0700 Subject: Revert "Make it possible to set up libgit directly (instead of from the environment)" This reverts commit 0270083ded143fd49841e3d3d0cac5eb06081d2a. --- perl/Git.pm | 11 +++++------ perl/Git.xs | 16 +--------------- 2 files changed, 6 insertions(+), 21 deletions(-) (limited to 'perl') diff --git a/perl/Git.pm b/perl/Git.pm index 9da15e9c8c..9ce9fcdd3e 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -98,8 +98,6 @@ XSLoader::load('Git', $VERSION); } -my $instance_id = 0; - =head1 CONSTRUCTORS @@ -217,7 +215,7 @@ sub repository { delete $opts{Directory}; } - $self = { opts => \%opts, id => $instance_id++ }; + $self = { opts => \%opts }; bless $self, $class; } @@ -835,10 +833,11 @@ sub _call_gate { if (defined $self) { # XXX: We ignore the WorkingCopy! To properly support # that will require heavy changes in libgit. - # For now, when we will need to do it we could temporarily - # chdir() there and then chdir() back after the call is done. - xs__call_gate($self->{id}, $self->repo_path()); + # XXX: And we ignore everything else as well. libgit + # at least needs to be extended to let us specify + # the $GIT_DIR instead of looking it up in environment. + #xs_call_gate($self->{opts}->{Repository}); } # Having to call throw from the C code is a sure path to insanity. diff --git a/perl/Git.xs b/perl/Git.xs index 6ed26a29b8..2bbec4365f 100644 --- a/perl/Git.xs +++ b/perl/Git.xs @@ -52,21 +52,7 @@ BOOT: } -void -xs__call_gate(repoid, git_dir) - long repoid; - char *git_dir; -CODE: -{ - static long last_repoid; - if (repoid != last_repoid) { - setup_git(git_dir, - getenv(DB_ENVIRONMENT), - getenv(INDEX_ENVIRONMENT), - getenv(GRAFT_ENVIRONMENT)); - last_repoid = repoid; - } -} +# /* TODO: xs_call_gate(). See Git.pm. */ char * -- cgit v1.2.3