fixed second problem in http://groups.google.com/group/git-python/browse_thread/threa...
authorFlorian Apolloner <florian@apolloner.eu>
Fri, 20 Jun 2008 19:05:10 +0000 (21:05 +0200)
committerFlorian Apolloner <florian@apolloner.eu>
Fri, 20 Jun 2008 19:05:10 +0000 (21:05 +0200)
I'll look at the other one in an hour

lib/git/commit.py

index 701f6c0412cb1b52f9843e160bb7e88954d05a69..fb52e42a4dd314d179cbca9106071dbb2aa0e21c 100644 (file)
@@ -154,7 +154,7 @@ class Commit(LazyMixin):
         return commits
 
     @classmethod
-    def diff(cls, repo, a, b = None, paths = []):
+    def diff(cls, repo, a, b = None, paths = None):
         """
         Show diffs between two trees:
 
@@ -175,6 +175,8 @@ class Commit(LazyMixin):
         Returns
             GitPython.Diff[]
         """
+        paths = paths or []
+
         if isinstance(b, list):
             paths = b
             b = None