Browse Source

GitImportProcessor: handle markers for merges

Antoine Pietri 7 years ago
parent
commit
f66e75361f
1 changed files with 4 additions and 1 deletions
  1. 4 1
      dulwich/fastexport.py

+ 4 - 1
dulwich/fastexport.py

@@ -200,7 +200,10 @@ class GitImportProcessor(processor.ImportProcessor):
                 self._contents.items()))
         if self.last_commit is not None:
             commit.parents.append(self.last_commit)
-        commit.parents += cmd.merges
+        for merge in cmd.merges:
+            if merge.startswith(b':'):
+                merge = self.markers[merge[1:]]
+            commit.parents.append(merge)
         self.repo.object_store.add_object(commit)
         self.repo[cmd.ref] = commit.id
         self.last_commit = commit.id