GitWrapper\GitWorkingCopy::isAhead PHP Method

isAhead() public method

If this returns true it means that commits are present locally which have not yet been pushed to the remote.
public isAhead ( ) : boolean
return boolean
    public function isAhead()
    {
        if (!$this->isTracking()) {
            throw new GitException('Error: HEAD does not have a remote tracking branch. Cannot check if it is ahead.');
        }
        $this->clearOutput();
        $merge_base = (string) $this->run(array('merge-base @ @{u}'));
        $local_sha = (string) $this->run(array('rev-parse @'));
        $remote_sha = (string) $this->run(array('rev-parse @{u}'));
        return $merge_base === $remote_sha && $local_sha !== $remote_sha;
    }