Re: git stash while pending merge should not be allowed

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: git stash while pending merge should not be allowed

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:35

Scott McPeak [off-list ref] 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)?

Re: git stash while pending merge should not be allowed

From: Scott McPeak <hidden>
Date: 2016-06-15 22:57:44

On 06/07/13 11:47, Junio C Hamano wrote:
Scott McPeak [off-list ref] writes:
quoted
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)?
If you're asking me, I don't know.  My first thought is if there is any 
pending state that "stash" doesn't save, stash should refuse to run. 
But I don't know know very much about some of those commands.

-Scott

Re: git stash while pending merge should not be allowed

From: John Keeping <hidden>
Date: 2016-06-15 22:57:44

On Fri, Jun 07, 2013 at 11:47:07AM -0700, Junio C Hamano wrote:
Scott McPeak [off-list ref] writes:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help