diff --git a/git/diff.py b/git/diff.py index d1c6c0ac3..073b0379d 100644 --- a/git/diff.py +++ b/git/diff.py @@ -79,13 +79,13 @@ def diff(self, other=Index, paths=None, create_patch=False, **kwargs): if paths is not None and not isinstance(paths, (tuple,list)): paths = [ paths ] + args.insert(0,self) + if other is not None and other is not self.Index: args.insert(0, other) if other is self.Index: args.insert(0, "--cached") - args.insert(0,self) - # paths is list here or None if paths: args.append("--")