File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ use warnings;
55
66no warnings ' uninitialized' ;
77
8+ my ($real_git ) = grep { chomp ; $_ ne $0 } ` which -a git` ;
9+
810$0 = ' git' ;
911
1012my %commit = (
@@ -19,7 +21,7 @@ my %checkout = (
1921
2022# git --git-dir=/home/frew/code/dotfiles/.git --no-pager grep -n --no-color foo
2123
22- exec ' /usr/bin/git ' unless @ARGV ;
24+ exec $real_git unless @ARGV ;
2325
2426my ($precmd , $command , $args ) = _parse_args(@ARGV );
2527my @args = @$args ;
@@ -74,7 +76,7 @@ if ($commit{$command} && exists $args[0] && $args[0] =~ /^-a|^--all/) {
7476 }
7577}
7678
77- my @run = (' /usr/bin/git ' , @$precmd , $command , @args );
79+ my @run = ($real_git , @$precmd , $command , @args );
7880warn join (' ' , @run ) . " \n " if $ENV {GIT_WRAPPER_DEBUG };
7981exec @run ;
8082
You can’t perform that action at this time.
0 commit comments