Hi, Using git 2.6.0 on Linux 64-bit git apply --cached failed Please test with command with the repository inside the attached tarball. With git 2.6, git apply --cached < patch.patch fatal: corrupt patch at line 27 Expected result: no error Step to reproduce: Please run the following shell script. #/bin/sh set -e mkdir 2 cd 2 cat > d0c886e2-2cfe-4636-825b-3622fac0b27f <<EOF 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 EOF git init git status -s -b -u git diff --numstat --cached -- git diff --numstat -- git update-index --add --stdin <<EOF d0c886e2-2cfe-4636-825b-3622fac0b27f EOF git commit --file=- <<EOF a commit for d0c886e2-2cfe-4636-825b-3622fac0b27f EOF git status -s -b -u git diff --numstat --cached -- git diff --numstat -- git diff d0c886e2-2cfe-4636-825b-3622fac0b27f git apply --cached <<EOF diff --git a/d0c886e2-2cfe-4636-825b-3622fac0b27f b/d0c886e2-2cfe-4636-825b-3622fac0b27f index 749b185..1627b6b 100644 --- a/d0c886e2-2cfe-4636-825b-3622fac0b27f +++ b/d0c886e2-2cfe-4636-825b-3622fac0b27f @@ -1,8 +1,8 @@ 0 1 -2 -3 -4 +2! +3! +4! 5 6 7 @@ -10,9 +10,9 @@ 9 10 11 12 13 14 15 16 17 @@ -20,9 +20,9 @@ 19 20 21 -22 -23 -24 +22! +23! +24! 25 26 27 EOF -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html