git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [RFC] stash --continue
@ 2017-01-15 23:56 Stephan Beyer
  2017-01-16  3:59 ` Jacob Keller
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Stephan Beyer @ 2017-01-15 23:56 UTC (permalink / raw)
  To: git

Hi,

a git-newbie-ish co-worker uses git-stash sometimes. Last time he used
"git stash pop", he got into a merge conflict. After he resolved the
conflict, he did not know what to do to get the repository into the
wanted state. In his case, it was only "git add <resolved files>"
followed by a "git reset" and a "git stash drop", but there may be more
involved cases when your index is not clean before "git stash pop" and
you want to have your index as before.

This led to the idea to have something like "git stash --continue"[1]
that would expect the user to "git add" the resolved files (as "git
status" suggests) but then leads to the expected result, i.e. the index
being the same as before the conflict, the stash being dropped (if "pop"
was used instead of "apply"), etc.

Likewise, some "git stash --abort"[2] might be useful in case you did
"git stash pop" with the wrong stash in mind.

What do you think about that?

Although I think this would be a nice-to-have feature, I am not totally
sure how to achieve backwards-compatibility, i.e., such that using
--continue is still optional... (I think that "git stash apply" would
surely generate auxiliary data in case of a conflict and --continue or
--abort would remove it...)

Best
  Stephan

Footnotes
1. Perhaps with a better name, because it does not really continue.
Maybe a "git stash conflict [--resolved]" subcommand?
2. Along the lines of [1], one could use "git stash conflict --abort"?

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-01-20 15:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-15 23:56 [RFC] stash --continue Stephan Beyer
2017-01-16  3:59 ` Jacob Keller
2017-01-16 10:54 ` Johannes Schindelin
2017-01-18 15:41   ` Marc Branchaud
2017-01-18 16:34     ` Johannes Schindelin
2017-01-18 18:44       ` Marc Branchaud
2017-01-18 19:35         ` Samuel Lijin
2017-01-19 15:49         ` Johannes Schindelin
2017-01-19 18:38           ` Marc Branchaud
2017-01-19 21:30             ` Johannes Schindelin
2017-01-20 15:19               ` Marc Branchaud
2017-01-20 15:27                 ` Johannes Schindelin
2017-01-18 19:10       ` Junio C Hamano
2017-01-18 19:20     ` Stephan Beyer
2017-01-19 15:54       ` Johannes Schindelin
2017-01-17 20:21 ` Junio C Hamano

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).