git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Péter András Felvégi" <petschy@gmail.com>
To: git <git@vger.kernel.org>
Cc: Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
Subject: Re: Surprise at git stash pop
Date: Tue, 26 Jul 2011 11:26:06 +0200	[thread overview]
Message-ID: <CAG3eYYR3PnGYJohAwTfDD24QKqgsaoW_i7v5FS0vqyXS6udF_w@mail.gmail.com> (raw)
In-Reply-To: <5fuhYLPOf07EnF5c5gyqAvbP3UZl6m72FicTS5tZnr3K8vTH5UoLkA@cipher.nrlssc.navy.mil>

Hello,

2011/7/25 Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil>:
> On 07/25/2011 10:45 AM, Péter András Felvégi wrote:
>> Hello,
>>
>> 'git stash pop' erased my local modifications, but not all of them.
>
> Hi,
>
> I cannot reproduce this.  What version of git are you using?

git 1.7.5.4 on Debian Wheezy AMD64

>
> Can you produce a test case?  This could be a test repo that
> you can share or a sequence of commands to produce such a
> repo like:

Not likely, but I will try. My repo started as CVS, then converted to
SVN, and about a year ago, I switched to GIT. It has 5+ years of
history, 9k+ commits, multiple branches, merges.

What I checked so far is that:
- the stash on 089709b I was popping is of 2011.03.01
- since then, a lot of commits and fast forward merges were done on the branch
- there were some rebase -i's to squash commits together, but I was
careful not to alter commits already pushed to the central repo

Since yesterday, I found out that my branch diverged:

# Your branch and 'origin/20110207-oracle' have diverged,
# and have 11 and 9 different commit(s) each, respectively.

I don't know how can this happen, because I only pull/push to/from the
central repo, and noone else is using it.

When I pulled, there were merge conflicts, earlier versions of the
files showing up. There were 3 files, SQLQueryCache cpp/hpp and
AdsPlugin.cpp. I resolved the commits by keeping the HEAD versions.

What is interesting is that the stash item that caused the problems is
still there, despite that it was popped:

$ git stash list
stash@{0}: WIP on 20110207-oracle: 089709b Merge branch
'20110207-oracle' of ssh://... into 20110207-oracle

$ git stash show
 build-configs.def |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

I made a copy of my local repo, and the central one, too, but I don't
really know what to do now. The state of the repo before the pop is
lost, unfortunately.

Is there some option for git to log its actions, so that in cases like
this one could check on the inner workings?

Regards, Peter

      reply	other threads:[~2011-07-26  9:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-25 15:45 Surprise at git stash pop Péter András Felvégi
2011-07-25 17:55 ` Brandon Casey
2011-07-26  9:26   ` Péter András Felvégi [this message]

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=CAG3eYYR3PnGYJohAwTfDD24QKqgsaoW_i7v5FS0vqyXS6udF_w@mail.gmail.com \
    --to=petschy@gmail.com \
    --cc=brandon.casey.ctr@nrlssc.navy.mil \
    --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 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).