Merge "Prune old branches when updating cache"
This commit is contained in:
commit
d5da803ff8
@ -125,7 +125,7 @@ function get_repos_for_element(){
|
|||||||
echo "Updating cache of $REPOLOCATION in $CACHE_PATH with ref $REPOREF"
|
echo "Updating cache of $REPOLOCATION in $CACHE_PATH with ref $REPOREF"
|
||||||
# Copy named refs (which might be outside the usual heads
|
# Copy named refs (which might be outside the usual heads
|
||||||
# pattern) - e.g. gerrit
|
# pattern) - e.g. gerrit
|
||||||
if [ "$REPOREF" == "*" ] || ! git --git-dir=$CACHE_PATH/.git fetch --update-head-ok $REPOLOCATION \
|
if [ "$REPOREF" == "*" ] || ! git --git-dir=$CACHE_PATH/.git fetch --prune --update-head-ok $REPOLOCATION \
|
||||||
+${REPOREF}:${REPOREF} ; then
|
+${REPOREF}:${REPOREF} ; then
|
||||||
# Copy all heads from the remote repository - this permits
|
# Copy all heads from the remote repository - this permits
|
||||||
# using a SHA1 object reference so long as the object
|
# using a SHA1 object reference so long as the object
|
||||||
|
Loading…
Reference in New Issue
Block a user