Skip to content

Commit 191474a

Browse files
author
Edward Thomson
committed
diff: don't do rename detection on submodules
1 parent 9536736 commit 191474a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/diff_tform.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,8 @@ static int similarity_measure(
553553

554554
*score = -1;
555555

556-
/* don't try to compare files of different types */
557-
if (GIT_MODE_TYPE(a_file->mode) != GIT_MODE_TYPE(b_file->mode))
556+
/* don't try to compare things that aren't files */
557+
if (!GIT_MODE_ISBLOB(a_file->mode) || !GIT_MODE_ISBLOB(b_file->mode))
558558
return 0;
559559

560560
/* if exact match is requested, force calculation of missing OIDs now */

0 commit comments

Comments
 (0)