git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bug: transform a binary file into a symlink in one commit => invalid binary patch
@ 2009-01-23 12:25 Pixel
  2009-01-23 13:13 ` Michael J Gruber
  2009-01-26  0:35 ` Jeff King
  0 siblings, 2 replies; 7+ messages in thread
From: Pixel @ 2009-01-23 12:25 UTC (permalink / raw)
  To: git

hi, 

i hit a bug (git 1.6.1): when you transform a binary file into a
symlink in one commit, the binary patch can't be used in "git apply".
Is it a known issue?


reproducer: 

----------
#!/bin/sh -e

# the bug: if you transform a binary file into a symlink in one commit, 
# the binary patch can't be used in "git apply"
#
# nb: if you uncomment the "##" lines, the problem disappears
# since the first patch will empty the binary file then the non-binary file
# will be transformed into a symlink

rm -rf t t2
mkdir t
dd if=/dev/urandom of=t/a count=10
cp -r t t2

cd t
git init
git add .
git commit -m initial

##echo -n > a
##git commit -a -m foo
ln -sf zzz a
git commit -a -m foo2
git format-patch :/initial

cd ../t2
git apply ../t/*.patch

cd ..
rm -rf t t2
----------

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-01-28 21:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-23 12:25 bug: transform a binary file into a symlink in one commit => invalid binary patch Pixel
2009-01-23 13:13 ` Michael J Gruber
2009-01-26  0:35 ` Jeff King
2009-01-26  7:37   ` Junio C Hamano
2009-01-26  8:33     ` [PATCH] diff.c: output correct index lines for a split diff Junio C Hamano
2009-01-26  9:07       ` Jeff King
2009-01-28 21:32         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).