Make __commits global in git.py
authorCatalin Marinas <catalin.marinas@gmail.com>
Tue, 4 Oct 2005 19:56:18 +0000 (20:56 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Tue, 4 Oct 2005 19:56:18 +0000 (20:56 +0100)
Some weird errors with Python scoping for the __head global variable
required the use of global. Add it for this variable as well.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/git.py

index 7a5c9e4..083e97f 100644 (file)
@@ -92,6 +92,8 @@ def get_commit(id_hash):
     """Commit objects factory. Save/look-up them in the __commits
     dictionary
     """
+    global __commits
+
     if id_hash in __commits:
         return __commits[id_hash]
     else: