updated plugin Gitium version 1.0.5

This commit is contained in:
2023-06-28 12:45:49 +00:00
committed by Gitium
parent f710fa7de2
commit 7d5eef77cf
5 changed files with 367 additions and 340 deletions

View File

@ -155,11 +155,13 @@ class Git_Wrapper {
protected function _call(...$args) {
$args = join( ' ', array_map( 'escapeshellarg', $args ) );
$cmd = "git $args 2>&1";
$return = -1;
$response = array();
$env = $this->get_env();
$git_bin_path = apply_filters( 'gitium_git_bin_path', '' );
$cmd = "${git_bin_path}git $args 2>&1";
$proc = proc_open(
$cmd,
array(
@ -430,7 +432,7 @@ class Git_Wrapper {
function get_remote_branches() {
list( , $response ) = $this->_call( 'branch', '-r' );
$response = array_map( 'trim', $response );
$response = array_map( create_function( '$b', 'return str_replace("origin/","",$b);' ), $response );
$response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );
return $response;
}