git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stephan Beyer <s-beyer@gmx.net>
To: git <git@vger.kernel.org>
Subject: [RFC] stash --continue
Date: Mon, 16 Jan 2017 00:56:00 +0100	[thread overview]
Message-ID: <cd784a4e-ee99-564e-81de-9f7f6cc26c67@gmx.net> (raw)

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"?

             reply	other threads:[~2017-01-15 23:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-15 23:56 Stephan Beyer [this message]
2017-01-16  3:59 ` [RFC] stash --continue 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

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cd784a4e-ee99-564e-81de-9f7f6cc26c67@gmx.net \
    --to=s-beyer@gmx.net \
    --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.
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).