support to update a repository

We sometime want to update a repository without fetching an actual
refspec. A typical example is to fetch tags, since I did not manage to
pass -t to git.fetch(), I am using instead the GitPython repo.update()
calls which binds to `git remote update`.

reset() add a clearing cache to make sure PyGit does not fail whenever
the remote repository has been updated. Instead of duplicating code
between reset() and update(), I have moved the recache command to
update() and make reset() to call this new update().

Change-Id: I0d989dfc1f31ede6c79ccdd1d5b3968978a418ab
Reviewed-on: https://review.openstack.org/19927
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
1 file changed