git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Susi <psusi@ubuntu.com>
To: Andrew Ardill <andrew.ardill@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: stash refuses to pop
Date: Tue, 10 Apr 2012 22:59:39 -0400	[thread overview]
Message-ID: <4F84F39B.6070907@ubuntu.com> (raw)
In-Reply-To: <CAH5451=0KvUPB77hKyjFVXRwPfEZ8+45b20SimBPmuF-gq_A3w@mail.gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/10/2012 10:47 PM, Andrew Ardill wrote:
> The first question, it would seem, is what should git do when there
> are modified files present, and the user tries to pop a stash which
> touches those files. The current behaviour is to reject the pop,
> reasonable enough, though for what exact reason I am not sure
> (potential merge issues, I assume).

Since pop is the inverse of push, and merge is the inverse of a partial push, I would expect pop to perform a merge.

> The method you have described is just one way of coming on this
> situation. The user could have
> * stashed their work, modified some files and tried to pop
> * partially stashed their work, and tried to pop
> * partially stashed their work, modified some files and then tried to pop.

Yes, there are a number of ways you can get to the situation where you can not pop the stash.  How to resolve this is unclear from the results of the failed pop.  I finally ended up resolving it by committing the remaining changes, then popping the stash ( which performed the merge successfully ), and finally doing a git reset HEAD~1 to remove the temporary commit, but preserve the merged results.  This seemed like a good deal of unnecessary trouble.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPhPObAAoJEJrBOlT6nu75qwkH/jlWpu+yRIx9l8qsp4+MWB/I
FPfKku+LnUpRoegsmKMer1J59kriw8zJF8hujHUUp1RcCdfQBUJwCDZnNGEa/LRn
PNrceRHc3V92ImBBJHwLsOqr4IQa7O+PDG8Tuht6q6NwIxEu2ZycoxnThx7JoF/G
wsD5KA9yZmJKb+lptCNVVfgez4k6ESqnekx4Tsl8C5UOUXbra61SC6vG+igRnU2P
6V+QaYbHEmNNq3pLmebCty/wmzwHJc9oTA+wDawJwV5BhcgsKnUY0RhVMT86t1Qu
IbwqkFUJV9je1GZKEwklvbLnBx2js80yvEnPWpC3jt9j6gxRGAfaq/5NQnl7vQE=
=UEM3
-----END PGP SIGNATURE-----

  reply	other threads:[~2012-04-11  2:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 17:52 stash refuses to pop Phillip Susi
2012-04-10 18:05 ` Junio C Hamano
2012-04-10 18:56   ` Phillip Susi
2012-04-11  2:47     ` Andrew Ardill
2012-04-11  2:59       ` Phillip Susi [this message]
2012-04-14  4:27         ` Andreas Krey
2012-04-14 10:12           ` Jakub Narebski
2012-04-16  1:29           ` Phillip Susi
2012-04-11  7:15       ` Victor Engmark
2012-04-11  5:58     ` Johannes Sixt
2012-04-11 14:21       ` Phillip Susi
2012-04-12  5:50         ` Johannes Sixt

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=4F84F39B.6070907@ubuntu.com \
    --to=psusi@ubuntu.com \
    --cc=andrew.ardill@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).