Ubuntu Pastebin

Paste from Nish at Wed, 21 Sep 2016 15:43:27 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
diff --git a/usd-import b/usd-import
index ac16be1..f2f0236 100755
--- a/usd-import
+++ b/usd-import
@@ -110,7 +110,7 @@ class USDGitRepository:
                            env=self._env
                           )
             for branch in self._local_repo.listall_branches(pygit2.GIT_BRANCH_REMOTE):
-                local_head_name = branch[len(remote_name):]
+                _, _, local_head_name = branch.partition('%s/' % remote_name)
                 # ensure local heads exist, tracking remotes if they are
                 # being freshly created
                 self.get_or_create_head(local_head_name, self._local_repo.lookup_branch(branch, pygit2.GIT_BRANCH_REMOTE))
Download as text