We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9536736 commit 191474aCopy full SHA for 191474a
src/diff_tform.c
@@ -553,8 +553,8 @@ static int similarity_measure(
553
554
*score = -1;
555
556
- /* don't try to compare files of different types */
557
- 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))
558
return 0;
559
560
/* if exact match is requested, force calculation of missing OIDs now */
0 commit comments