diff -Naur git-2.9.0/builtin/apply.c git-2.9.0-1/builtin/apply.c --- git-2.9.0/builtin/apply.c 2016-06-13 21:07:49.000000000 +0200 +++ git-2.9.0-1/builtin/apply.c 2016-06-14 11:38:19.940588382 +0200 @@ -937,7 +937,7 @@ die(_("git apply: bad git-diff - expected /dev/null, got %s on line %d"), orig_name, linenr); another = find_name(line, NULL, p_value, TERM_TAB); - if (!another || memcmp(another, orig_name, len + 1)) + if (!another || strncmp(another, orig_name, len + 1)) die((side == DIFF_NEW_NAME) ? _("git apply: bad git-diff - inconsistent new filename on line %d") : _("git apply: bad git-diff - inconsistent old filename on line %d"), linenr);