From b8990dd0a499aca1c55b781e5a84ecc3f69d9658 Mon Sep 17 00:00:00 2001 From: Bruno Postle Date: Sat, 20 May 2023 09:25:33 +0100 Subject: [PATCH] Fix merging of remote branches (#3096) You can now 'clone' a remote repository and 'push' to it. There is no 'pull' functionality because this can fail badly, so there is a 'fetch' which retrieves all remote branches without merging (and never fails). The user can then select the remote branch in the branch pull-down and merge it. --- src/blenderbim/blenderbim/tool/ifcgit.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/blenderbim/blenderbim/tool/ifcgit.py b/src/blenderbim/blenderbim/tool/ifcgit.py index f37d9289ba..ac77318933 100644 --- a/src/blenderbim/blenderbim/tool/ifcgit.py +++ b/src/blenderbim/blenderbim/tool/ifcgit.py @@ -191,6 +191,13 @@ class IfcGit: result[branch.commit.hexsha].append(branch) else: result[branch.commit.hexsha] = [branch] + if repo.remotes: + for remote in repo.remotes: + for ref in remote.refs: + if ref.commit.hexsha in result: + result[ref.commit.hexsha].append(ref) + else: + result[ref.commit.hexsha] = [ref] return result @classmethod