git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Camille Moncelier <moncelier@devlife.org>
Cc: git@vger.kernel.org
Subject: Re: cherry-pick fail when a symbolic link has been changed into a file or directory
Date: Thu, 4 Nov 2010 14:55:12 +0100	[thread overview]
Message-ID: <AANLkTimq8SP-gxZQiXW3Pxg3-1Z98zyPAoNA8JDn0=6A@mail.gmail.com> (raw)
In-Reply-To: <20101104125641.2ef90853@cortex>

Could you try to cherry-pick with other strategies?
For example with:

git cherry-pick --strategy resolve test1

I remember there were some problems with the default "recursive"
strategy and I am not sure they were fixed.
By the way could you tell which version of git you are using?

Thanks,
Christian.

On Thu, Nov 4, 2010 at 12:56 PM, Camille Moncelier
<moncelier@devlife.org> wrote:
> I'm reposting this since I didn't get any responses and I think my
> message didn't contained enought context.
>
> I think I may have spotted a bug, or a unhandled case when doing a
> cherry-pick
>
> Consider a repository like this:
>
> # Initialize a dummy repository
>    mkdir -p repo1 ; cd repo1
>    git init .
>
> # Create a new directory `dir1' and a link to it `dir2'
>    mkdir dir1
>    echo file1 > dir1/file1
>    ln -s dir1 dir2
>    git add dir1 dir2
>    git commit -m "Initial status: dir2 -> dir1"
>
> # Create a branch named `test1' remove the `dir2' link and
> # replace it by a new directory
>    git checkout -b test1
>    git rm dir2
>    mkdir dir2
>    touch file2 > dir2/file1
>    git add dir2/file1
>    git commit -m "Removing link: dir1/ and dir2/"
>
> # Now create a new file in `test1' branch
>    message="New file in test1"
>    echo $message > new_file_test1
>    git add new_file_test1
>    git commit -m "$message"
>
> # Now try to cherry-pick last commit from `test1' into master
>    git co master
>    git cherry-pick test1
>
> The cherry-pick fails saying if failed to merge `dir2' despite the fact
> that the commit doesn't affect `dir2' and
>
> git diff test1~..test1 | git apply
>
> is working. Am I doing something wrong ?
>
> --
> Camille Moncelier
> http://devlife.org
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2010-11-04 13:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-04 11:56 cherry-pick fail when a symbolic link has been changed into a file or directory Camille Moncelier
2010-11-04 13:55 ` Christian Couder [this message]
2010-11-04 13:58   ` Christian Couder
2010-11-04 14:16   ` Camille Moncelier
2010-11-04 17:03     ` Christian Couder
2010-11-04 17:15       ` Camille Moncelier
2010-11-05  8:33         ` Christian Couder
     [not found]         ` <AANLkTimDWM69qvY5wdyzFu=g6htg12-K542PRR4bdDYq@mail.gmail.com>
2010-11-05  8:34           ` Christian Couder
2010-11-07  9:42             ` Camille Moncelier
2010-11-07 10:19               ` Andreas Schwab

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='AANLkTimq8SP-gxZQiXW3Pxg3-1Z98zyPAoNA8JDn0=6A@mail.gmail.com' \
    --to=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=moncelier@devlife.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 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).