make convert-repo deal with git symbolic refs.
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Mon, 24 Jul 2006 13:47:29 -0700
changeset 2649 e6a7a6a33a62
parent 2648 df5e58c84b01
child 2658 2be3001847cb
make convert-repo deal with git symbolic refs. Problem noticed by Sébastien Pierre
contrib/convert-repo
--- a/contrib/convert-repo
+++ b/contrib/convert-repo
@@ -28,7 +28,8 @@ class convert_git:
         self.path = path
 
     def getheads(self):
-        return [file(self.path + "/HEAD").read()[:-1]]
+        fh = os.popen("GIT_DIR=%s git-rev-parse --verify HEAD" % self.path)
+        return [fh.read()[:-1]]
 
     def catfile(self, rev, type):
         if rev == "0" * 40: raise IOError()