summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2017-02-09 18:28:19 +0000
committerEdward Thomson <ethomson@github.com>2017-02-09 22:35:09 +0000
commit191474a1f423aaea6f0b9dacf68216b3ba8e34d4 (patch)
tree412725a932d2bb9d0eeb6a3eea57ccf70be8e1cf
parent95367366b2bed4d399cf91faf13b234273d861a8 (diff)
downloadlibgit2-ethomson/submodule_renames.tar.gz
diff: don't do rename detection on submodulesethomson/submodule_renames
-rw-r--r--src/diff_tform.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/diff_tform.c b/src/diff_tform.c
index f2ff147d1..b004ddd66 100644
--- a/src/diff_tform.c
+++ b/src/diff_tform.c
@@ -553,8 +553,8 @@ static int similarity_measure(
*score = -1;
- /* don't try to compare files of different types */
- if (GIT_MODE_TYPE(a_file->mode) != GIT_MODE_TYPE(b_file->mode))
+ /* don't try to compare things that aren't files */
+ if (!GIT_MODE_ISBLOB(a_file->mode) || !GIT_MODE_ISBLOB(b_file->mode))
return 0;
/* if exact match is requested, force calculation of missing OIDs now */