Skip to content

Git ​

final class · pocketmine\utils\Git · source

Methods ​

getRepositoryState() ​

php
public static function getRepositoryState(string $dir, bool &$dirty) : ?string

Returns the git hash of the currently checked out head of the given repository, or null on failure.

getRepositoryStatePretty() ​

php
public static function getRepositoryStatePretty(string $dir) : string

Infallible, returns a string representing git state, or a string of zeros on failure. If the repo is dirty, a "-dirty" suffix is added.

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.