Closed mih closed 3 years ago
diff --git a/datalad_ukbiobank/update.py b/datalad_ukbiobank/update.py
index 1da832a..635710f 100644
--- a/datalad_ukbiobank/update.py
+++ b/datalad_ukbiobank/update.py
@@ -245,7 +245,8 @@ class Update(Interface):
status='ok',
)
- want_bids = 'incoming-bids' in repo.get_branches()
+ want_bids = 'incoming-bids' in repo.get_branches() \
+ or any(b.endswith('/incoming-bids') for b in repo.get_remote_branches())
if want_bids:
repo.call_git(['checkout', 'incoming-bids'])
# mark the incoming change as merged
The detection of an
incoming-bids
branchhttps://github.com/datalad/datalad-ukbiobank/blob/46c743ef8fce01c6c321c7943533a9a0c420795f/datalad_ukbiobank/update.py#L248
relies on the assumption of it being locally present. However, in a fresh clone this will not be the case. We should also check remote branches.