{"thread":{"id":"40466","subject":"git 2.6.0 apply --cached failed","startedAt":"2015-10-01T05:38:17Z","lastAt":"2015-10-01T05:57:46Z","messageCount":2,"participants":["乙酸鋰","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"270974","messageId":"CAHtLG6TxAZsd54g+_eH2R3M=5oZ65V5cJ-0kkBt4vjbga+h9rQ@mail.gmail.com","threadId":"40466","inReplyTo":null,"subject":"git 2.6.0 apply --cached failed","fromName":"乙酸鋰","fromEmail":"ch3cooli@gmail.com","sentAt":"2015-10-01T05:38:17Z","receivedAt":"2015-10-01T05:38:17Z","isPatch":false,"sender":{"key":"ch3cooli@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2804967?v=4"},"body":"Hi,\n\nUsing git 2.6.0 on Linux 64-bit\ngit apply --cached failed\n\nPlease test with command with the repository inside the attached tarball.\n\nWith git 2.6,\ngit apply --cached < patch.patch\n\nfatal: corrupt patch at line 27\n\n\nExpected result: no error\n\nStep to reproduce: Please run the following shell script.\n\n#/bin/sh\nset -e\nmkdir 2\ncd 2\n\ncat > d0c886e2-2cfe-4636-825b-3622fac0b27f <<EOF\n0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\nEOF\ngit init\ngit status -s -b -u\ngit diff --numstat --cached --\ngit diff --numstat --\ngit update-index --add --stdin <<EOF\nd0c886e2-2cfe-4636-825b-3622fac0b27f\nEOF\ngit commit --file=- <<EOF\na commit for d0c886e2-2cfe-4636-825b-3622fac0b27f\nEOF\ngit status -s -b -u\ngit diff --numstat --cached --\ngit diff --numstat --\ngit diff d0c886e2-2cfe-4636-825b-3622fac0b27f\ngit apply --cached <<EOF\ndiff --git a/d0c886e2-2cfe-4636-825b-3622fac0b27f\nb/d0c886e2-2cfe-4636-825b-3622fac0b27f\nindex 749b185..1627b6b 100644\n--- a/d0c886e2-2cfe-4636-825b-3622fac0b27f\n+++ b/d0c886e2-2cfe-4636-825b-3622fac0b27f\n@@ -1,8 +1,8 @@\n 0\n 1\n-2\n-3\n-4\n+2!\n+3!\n+4!\n 5\n 6\n 7\n@@ -10,9 +10,9 @@\n 9\n 10\n 11\n 12\n 13\n 14\n 15\n 16\n 17\n@@ -20,9 +20,9 @@\n 19\n 20\n 21\n-22\n-23\n-24\n+22!\n+23!\n+24!\n 25\n 26\n 27\nEOF\n"},{"id":"270975","messageId":"xmqqzj035dwl.fsf@gitster.mtv.corp.google.com","threadId":"40466","inReplyTo":"CAHtLG6TxAZsd54g+_eH2R3M=5oZ65V5cJ-0kkBt4vjbga+h9rQ@mail.gmail.com","subject":"Re: git 2.6.0 apply --cached failed","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-10-01T05:57:46Z","receivedAt":"2015-10-01T05:57:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"It probably is this one:\n\n    http://thread.gmane.org/gmane.comp.version-control.git/270370/focus=270501\n\nOlder Git was loose and did not notice it, but the second hunk of\nyour patch is judged to be broken, with no added or deleted line\nwhatsoever, by the latest version.\n"}]}