git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Sebastian Schuberth <sschuberth@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: Merge seems to overwrite unstaged local changes
Date: Thu, 06 Oct 2011 08:35:59 -0700 (PDT)	[thread overview]
Message-ID: <m3zkhe16bu.fsf@localhost.localdomain> (raw)
In-Reply-To: <4E8DACCC.2050302@gmail.com>

Sebastian Schuberth <sschuberth@gmail.com> writes:
> On 29.09.2011 15:07, Sebastian Schuberth wrote:
> 
>>> There recently have been quite a change in merge-recursive implementation
>>> and it would be really nice if you can try this again with the tip of
>>> 'master' before 1.7.7 final ships.
>>
>> The unstaged changes do not seem to get lost during the merge anymore
>> when using git version 1.7.7.rc3.4.g8d714 on Linux. I guess that
>> somewhat confirms that there's a bug in git<  1.7.7. I'll write a word
>> of warning to our in-house git users that they should always commit
>> before merging ...
> 
> It seems I'm not the only one who lost code due to this bug. For a
> more detailed analysis see this blog post:
> 
> http://benno.id.au/blog/2011/10/01/git-recursive-merge-broken
> 
> As it turns out, my use case also involves a rename of the file in
> which changes were lost. And just like for the blog's author it
> somewhat concerns me and shakes my confidence in Git for how long this
> severe bug slipped through undetected.

Khmmm... perhaps Mercurial was right in its transaction-based
atomicity (that allows to safely merge even if there are local
changes; not theough that I have doubts if it is sane behavior)
;-)

I wonder if it would be possible to get some Comp. Sci. student, or
graduate, or postdoc, to analyse formally the recursive merge
algorithm.  And to *prove* that it is correct (or not).

-- 
Jakub Narębski

  reply	other threads:[~2011-10-06 15:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-28 14:08 Merge seems to overwrite unstaged local changes Sebastian Schuberth
2011-09-28 15:25 ` Junio C Hamano
2011-09-29 13:07   ` Sebastian Schuberth
2011-10-06 13:27     ` Sebastian Schuberth
2011-10-06 15:35       ` Jakub Narebski [this message]
2012-01-10 14:08         ` Another casualty Chris Hatton

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=m3zkhe16bu.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sschuberth@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).