All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pixel <pixel@mandriva.com>
To: git@vger.kernel.org
Subject: bug: transform a binary file into a symlink in one commit => invalid binary patch
Date: Fri, 23 Jan 2009 13:25:30 +0100	[thread overview]
Message-ID: <lyhc3q9pl1.fsf@leia.mandriva.com> (raw)

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

             reply	other threads:[~2009-01-23 12:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23 12:25 Pixel [this message]
2009-01-23 13:13 ` bug: transform a binary file into a symlink in one commit => invalid binary patch 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=lyhc3q9pl1.fsf@leia.mandriva.com \
    --to=pixel@mandriva.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.