Skip to content

Commit

Permalink
Merge branch 'add-update-index'
Browse files Browse the repository at this point in the history
  • Loading branch information
ribeiropaulor committed Feb 7, 2018
2 parents 97ef13c + 28fa8ac commit a5dded3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/GitRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,20 @@ public function setRemoteUrl($name, $url, array $params = NULL)
->end();
}

/**
* Refresh working tree index.
* Looks at the current index and checks to see if merges or updates are needed by
* checking stat() information. Useful when you want to make sure git all the latest
* changes will appear in the git status.
* @return self
*/
public function refresh()
{
return $this->begin()
->run('git update-index -q --refresh')
->end();
}


/**
* @return self
Expand Down

0 comments on commit a5dded3

Please sign in to comment.