Skip to content

Commit

Permalink
IGit and GitRepository: added missing pull() (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
mawalu authored and janpecha committed Apr 13, 2016
1 parent 5797fdc commit 6b00147
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/GitRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,26 @@ protected function end()
}


/**
* Pull changes from a remote
* @param string|NULL
* @param array|NULL
* @return self
* @throws GitException
*/
public function pull($remote = NULL, array $params = NULL)
{
if(!is_array($params))
{
$params = array();
}

return $this->begin()
->run("git pull $remote", $params)
->end();
}


/**
* @param string
* @param callback|NULL
Expand Down
10 changes: 10 additions & 0 deletions src/IGit.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ function commit($message, $params = NULL);
function hasChanges();


/**
* Pull changes from a remote
* @param string|NULL
* @param array|NULL
* @return self
* @throws GitException
*/
function pull($remote = NULL, array $params = NULL);


/**
* Init repo in directory
* @param string
Expand Down

0 comments on commit 6b00147

Please sign in to comment.