git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git 2.6.0 apply --cached failed

From
乙酸鋰 <ch3cooli@gmail.com>
Date
Oct 1, 2015, 05:38 UTC
Message-ID
<CAHtLG6TxAZsd54g+_eH2R3M=5oZ65V5cJ-0kkBt4vjbga+h9rQ@mail.gmail.com>
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
Next: Junio C Hamano
Message 1 of 2 in “git 2.6.0 apply --cached failed”
  1. 乙酸鋰Oct 1, 2015
  2. Junio C HamanoOct 1, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.