From 8062f81c2d9df5e6552bf267b258ffcc5f647f93 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sat, 24 Jun 2006 04:34:34 +0200 Subject: Git.pm: Call external commands using execv_git_cmd() Instead of explicitly using the git wrapper to call external commands, use the execv_git_cmd() function which will directly call whatever needs to be called. GitBin option becomes useless so drop it. This actually means the exec_path() thing I planned to use worthless internally, but Jakub wants it in anyway and I don't mind, so... Signed-off-by: Petr Baudis Signed-off-by: Junio C Hamano --- perl/Git.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'perl/Git.pm') diff --git a/perl/Git.pm b/perl/Git.pm index 5c5ae1246b..212337ee5b 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -122,9 +122,6 @@ to the subdirectory and the directory is assumed to be the working copy. If the directory does not have the subdirectory, C is left undefined and C is pointed to the directory itself. -B - Path to the C binary executable. By default the C<$PATH> -is searched for it. - You should not use both C and either of C and C - the results of that are undefined. @@ -363,11 +360,14 @@ sub _cmd_exec { $self->{opts}->{Repository} and $ENV{'GIT_DIR'} = $self->{opts}->{Repository}; $self->{opts}->{WorkingCopy} and chdir($self->{opts}->{WorkingCopy}); } - my $git = $self->{opts}->{GitPath}; - $git ||= 'git'; - exec ($git, @args) or croak "exec failed: $!"; + xs__execv_git_cmd(@args); + croak "exec failed: $!"; } +# Execute the given Git command ($_[0]) with arguments ($_[1..]) +# by searching for it at proper places. +# _execv_git_cmd(), implemented in Git.xs. + # Close pipe to a subprocess. sub _cmd_close { my ($fh) = @_; -- cgit v1.2.3