GitWrapper\GitWorkingCopy::isUpToDate PHP Méthode

isUpToDate() public méthode

Returns whether HEAD is up-to-date with its remote tracking branch.
public isUpToDate ( ) : boolean
Résultat boolean
    public function isUpToDate()
    {
        if (!$this->isTracking()) {
            throw new GitException('Error: HEAD does not have a remote tracking branch. Cannot check if it is up-to-date.');
        }
        $this->clearOutput();
        $merge_base = (string) $this->run(array('merge-base @ @{u}'));
        $remote_sha = (string) $this->run(array('rev-parse @{u}'));
        return $merge_base === $remote_sha;
    }