git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Keeping <john@keeping.me.uk>
To: Junio C Hamano <gitster@pobox.com>
Cc: Scott McPeak <smcpeak@coverity.com>, git@vger.kernel.org
Subject: Re: git stash while pending merge should not be allowed
Date: Fri, 14 Jun 2013 09:30:19 +0100	[thread overview]
Message-ID: <20130614083018.GD23890@serenity.lan> (raw)
In-Reply-To: <7v1u8du5as.fsf@alter.siamese.dyndns.org>

On Fri, Jun 07, 2013 at 11:47:07AM -0700, Junio C Hamano wrote:
> Scott McPeak <smcpeak@coverity.com> writes:
> 
> > I suggest that this problem could easily have been avoided if "git
> > stash" refused to run with a pending merge (present MERGE_HEAD file),
> > since this is crucial repository state that it does not save.  This
> > seems similar to what "git cherry-pick" does.
> 
> Sounds senslbe.  What do we want to see happen in other states, in
> which Git gives control back to the user asking for help before
> moving forward (e.g. am, rebase, cherry-pick, revert)?

I don't think there's any need to prevent stash running in these cases
and I sometimes find it useful that I can stash during a rebase.

Having said that, I wonder what happens with "cherry-pick -x" if you do
stash changes while it is stopped.  I don't think that is as serious as
the merge case because it's easy to detect in the commit message.

      parent reply	other threads:[~2013-06-14  8:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-07  6:52 git stash while pending merge should not be allowed Scott McPeak
2013-06-07 18:47 ` Junio C Hamano
2013-06-13 23:59   ` Scott McPeak
2013-06-14  8:30   ` John Keeping [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=20130614083018.GD23890@serenity.lan \
    --to=john@keeping.me.uk \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=smcpeak@coverity.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).