git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Daniel Convissor <danielc@analysisandsolutions.com>,
	Adam A <hitsthings@gmail.com>,
	git@vger.kernel.org
Subject: Re: Bug: Pulling remotes into an empty repo deletes the index
Date: Sat, 10 Aug 2013 03:33:43 -0400	[thread overview]
Message-ID: <20130810073343.GE30185@sigill.intra.peff.net> (raw)
In-Reply-To: <20130803165728.GB2893@elie.Belkin>

On Sat, Aug 03, 2013 at 09:57:28AM -0700, Jonathan Nieder wrote:

> > All is not lost.  Your local files should be stored in the repository's
> > reflog.  Examine the output of "git reflog".  You can then reset your
> > working directory to obtain those files by doing something _like_
> > "git reset --hard HEAD@{1}".
> 
> Adam hadn't made a commit, so that wouldn't work in this case.
> 
> "git fsck --lost-found" should be helpful, but yeah, this is a bug.
> See for example [1] for the start of a patch to play with (needs
> tests).

If I understand the situation correctly, this is actually already fixed
in v1.8.3.3 and higher by b4dc085 (pull: merge into unborn by
fast-forwarding from empty tree, 2013-06-20).

-Peff

  parent reply	other threads:[~2013-08-10  7:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJOTJ-AVamimToPo4oQ=O_Pg+mJHQhardO+NfU8b1dvRxg1KMA@mail.gmail.com>
2013-08-03 12:01 ` Bug: Pulling remotes into an empty repo deletes the index Adam A
2013-08-03 16:39   ` Daniel Convissor
2013-08-03 16:57     ` Jonathan Nieder
2013-08-03 17:01       ` Daniel Convissor
2013-08-03 21:46       ` Adam A
2013-08-10  7:33       ` Jeff King [this message]
2013-08-03 16:59     ` Daniel Convissor

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20130810073343.GE30185@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=danielc@analysisandsolutions.com \
    --cc=git@vger.kernel.org \
    --cc=hitsthings@gmail.com \
    --cc=jrnieder@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).