summaryrefslogtreecommitdiff
path: root/setup.cfg
diff options
context:
space:
mode:
authorClark Boylan <clark.boylan@gmail.com>2015-05-14 15:51:57 -0700
committerClark Boylan <clark.boylan@gmail.com>2015-05-14 15:51:57 -0700
commitf5e16815546fa6d9e7edbc8b41a4e5ae68d12378 (patch)
tree8f073d69d9c08b96376346107c95c046c8561345 /setup.cfg
parent62dc90832a2196f82128ff2e64f0c57cec02294f (diff)
downloadzuul-f5e16815546fa6d9e7edbc8b41a4e5ae68d12378.tar.gz
Fix git prune order in zuul-cloner
The prune() operation relies on `git branch -d -r` to remove remote branches that are not valid. `git branch` seems to require that the repo HEAD refer to something in refs/heads and explodes if it does not. Unfortunately the repo reset() operation in zuul sets HEAD to point to refs/remotes/origin/master which is not in refs/heads. This leads to prune() breaking if run after reset(). Example explosion: git.exc.GitCommandError: 'git branch -d -r origin/fetch_master' returned with exit code 128 stderr: 'fatal: HEAD not found below refs/heads!' Thankfully the fix is simple. We can prune() bad refs prior to reseting, at this point in time the value of HEAD is still valid for `git branch` allowing prune to do its job, then we reset to the origin ref. Change-Id: If97668f729db395fc697465d56c7d0667f994d0d
Diffstat (limited to 'setup.cfg')
0 files changed, 0 insertions, 0 deletions