bug: transform a binary file into a symlink in one commit => invalid binary patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
----------
--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux