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.
This commit is contained in:
Bruno Postle
2023-05-20 09:25:33 +01:00
parent f7b2a68ed3
commit a8d20717cb
+7
View File
@@ -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