mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] forwardport: cached repo setup
Turns out bare repositories (unlike normal ones) don't have any refspecs by default. So adding the PR refspec would... replace the default behaviour (apparently?) and the base branches would never get fetched at all. --mirror looks to be an other option as it has a default refspec but it's a bit of an odd duck: it has pull requests in refs/pull but not all of them? And open / closed doesn't seem to be a factor.
This commit is contained in:
parent
60f4db8687
commit
0a64699070
@ -649,6 +649,10 @@ stderr:
|
||||
], check=True)
|
||||
# add PR branches as local but namespaced (?)
|
||||
repo = git(repo_dir)
|
||||
# bare repos don't have a fetch spec by default (!) so adding one
|
||||
# removes the default behaviour and stops fetching the base
|
||||
# branches unless we add an explicit fetch spec for them
|
||||
repo.config('--add', 'remote.origin.fetch', '+refs/heads/*:refs/heads/*')
|
||||
repo.config('--add', 'remote.origin.fetch', '+refs/pull/*/head:refs/heads/pull/*')
|
||||
return repo
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user