Skip to content

Commit

Permalink
GitRepository: added getRemoteBranches()
Browse files Browse the repository at this point in the history
  • Loading branch information
Bird87ZA authored and janpecha committed Jan 14, 2019
1 parent e014140 commit 1df0ce1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/GitRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,19 @@ public function getBranches()
}


/**
* Returns list of remote branches in repo.
* @return string[]|NULL NULL => no branches
* @throws GitException
*/
public function getRemoteBranches()
{
return $this->extractFromCommand('git branch -r', function($value) {
return trim(substr($value, 1));
});
}


/**
* Returns list of local branches in repo.
* @return string[]|NULL NULL => no branches
Expand Down

0 comments on commit 1df0ce1

Please sign in to comment.