git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Joe Angell <joe.d.angell@gmail.com>
Cc: Elijah Newren <newren@gmail.com>, git@vger.kernel.org
Subject: Re: git bug: moved file with local unstaged changes are lost during merge
Date: Fri, 13 Apr 2012 02:49:41 -0400	[thread overview]
Message-ID: <20120413064941.GC27214@sigill.intra.peff.net> (raw)
In-Reply-To: <CAAZnV3EwZ6kminW7D3ssn_Rtj2SsMHd++VCx7w14K5rQKba4_g@mail.gmail.com>

On Thu, Apr 12, 2012 at 10:13:04AM -0600, Joe Angell wrote:

> Is this the right place to post bug reports?

It is. Thanks for including a concise test case with your bug report.

Unfortunately, the merge-recursive code is a mess, and has several known
buggy corner cases with renames. Elijah (cc'd) spent a lot of time
trying to sort these out a while ago, but there still some known
failures. t6042 and t6036 detect some of them. But I thought we managed
to clean up all of the overwriting bugs.

Original bug report is below.

-Peff

> On Wed, Apr 11, 2012 at 12:20 PM, Joe Angell <joe.d.angell@gmail.com> wrote:
> > What steps will reproduce the problem?
> > git init
> > echo "initial checkin" >> readme
> > git add readme
> > git commit -m "inital checkin"
> > git branch b1
> > git checkout b1
> > echo "b1" >> readme
> > git add readme
> > git commit -m "b1 readme"
> > git checkout master
> > git mv readme readme_master
> > git ci -m "moved readme"
> > echo "master" >> readme_master
> > git merge b1
> >
> > What is the expected output? What do you see instead?
> > I expect to have git prevent the merge due to local changes to the
> > file.  Instead it overwrites the file (erasing the local modification
> > "master") and you end up with:
> > cat readme_master
> > initial readme
> > b1
> >
> > What version of the product are you using? On what operating system?
> > Reproduced on 1.7.9.6 and from the git-core repo 1.7.10.128.g7945c.
> > This is on ubuntu 10.04.
> >
> > Please provide any additional information below.
> >
> > This problem only seems to occur after you check in the move, then
> > make local modifications, then do the merge.
> >
> > --
> > ---------------
> > Joe Angell
> > cell: (720) 260-2190

  reply	other threads:[~2012-04-13  6:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 18:20 git bug: moved file with local unstaged changes are lost during merge Joe Angell
2012-04-12 16:13 ` Joe Angell
2012-04-13  6:49   ` Jeff King [this message]
2012-04-14 23:15     ` Clemens Buchacher
2012-04-29 14:17       ` Clemens Buchacher
2012-04-30  0:16         ` 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=20120413064941.GC27214@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=joe.d.angell@gmail.com \
    --cc=newren@gmail.com \
    /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).