]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-diff-stages.c
Do not use memcmp(sha1_1, sha1_2, 20) with hardcoded length.
[thirdparty/git.git] / builtin-diff-stages.c
index 5960e089975f1f27c55c5bd8ea1c968ffe695d1f..70bb89808d2296246edbafb8378aa651c3382261 100644 (file)
@@ -46,7 +46,7 @@ static void diff_stages(int stage1, int stage2, const char **pathspec)
                else if (!two)
                        diff_addremove(&diff_options, '-', ntohl(one->ce_mode),
                                       one->sha1, name, NULL);
-               else if (memcmp(one->sha1, two->sha1, 20) ||
+               else if (hashcmp(one->sha1, two->sha1) ||
                         (one->ce_mode != two->ce_mode) ||
                         diff_options.find_copies_harder)
                        diff_change(&diff_options,