summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Driessen <me@nvie.com>2016-04-14 17:31:17 +0200
committerVincent Driessen <me@nvie.com>2016-04-14 17:31:17 +0200
commit28afef550371cd506db2045cbdd89d895bec5091 (patch)
tree91685ed624f72c451908a41ffd44a10ad174d200
parent6bdaa463f7c73d30d75d7ea954dd3c5c0c31617b (diff)
downloadgitpython-28afef550371cd506db2045cbdd89d895bec5091.tar.gz
Perform diff-tree recursively to have the same output as diff
-rw-r--r--git/diff.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/git/diff.py b/git/diff.py
index 7a75ffed..de3aa1e8 100644
--- a/git/diff.py
+++ b/git/diff.py
@@ -95,9 +95,11 @@ class Diffable(object):
if other is self.Index:
args.insert(0, '--cached')
elif other is NULL_TREE:
+ args.insert(0, '-r') # recursive diff-tree
args.insert(0, '--root')
diff_cmd = self.repo.git.diff_tree
elif other is not None:
+ args.insert(0, '-r') # recursive diff-tree
args.insert(0, other)
diff_cmd = self.repo.git.diff_tree