git@vger.kernel.org mailing list mirror (one of many)
 help / Atom feed
From: Jeff King <peff@peff.net>
To: Thomas Gummerer <t.gummerer@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	git@vger.kernel.org
Subject: Re: [RFC] deprecate git stash save?  (was: Re: [PATCH 2/3] http-push: fix construction of hex value from path)
Date: Tue, 17 Oct 2017 00:13:33 -0400
Message-ID: <20171017041332.ooybecmonvssko2k@sigill.intra.peff.net> (raw)
In-Reply-To: <20171005200049.GF30301@hank>

On Thu, Oct 05, 2017 at 09:00:49PM +0100, Thomas Gummerer wrote:

> Since you were asking :)  With the introduction of 'git stash push',
> my hope was always that we could eventually get rid of 'git stash
> save' and only keep one interface around.
> 
> As there still many references to it around on the internet, it
> probably requires a bit of a longer deprecation plan.  What do you
> think about the following:
> 
> - Change docs/man pages to use 'git stash push' everywhere instead of
>   'git stash save'.
> - Mention the deprecation in the release notes and in the man page.
> - Print a warning when 'git stash save' is used.
> - Eventually get rid of it (maybe something for 3.0?)
> 
> The steps above would all occur sequentially with a few releases
> between each of them.

That sounds like a pretty good plan.

> A patch for the first step below.  I think that even makes sense if we
> don't want to follow through with the deprecation.

Agreed. The patch mostly looks good, except:

> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index b4d88af133..1c4e44892d 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -1556,7 +1556,7 @@ so on a different branch and then coming back), unstash the
>  work-in-progress changes.
>  
>  ------------------------------------------------
> -$ git stash save "work in progress for foo feature"
> +$ git stash push "work in progress for foo feature"
>  ------------------------------------------------

This needs "-m", doesn't it?

>  
>  This command will save your changes away to the `stash`, and
> diff --git a/git-stash.sh b/git-stash.sh
> index 8b2ce9afda..8ce6929d7f 100755
> --- a/git-stash.sh
> +++ b/git-stash.sh
> @@ -267,11 +267,11 @@ push_stash () {
>  			# translation of "error: " takes in your language. E.g. in
>  			# English this is:
>  			#
> -			#    $ git stash save --blah-blah 2>&1 | head -n 2
> -			#    error: unknown option for 'stash save': --blah-blah
> -			#           To provide a message, use git stash save -- '--blah-blah'
> -			eval_gettextln "error: unknown option for 'stash save': \$option
> -       To provide a message, use git stash save -- '\$option'"
> +			#    $ git stash push --blah-blah 2>&1 | head -n 2
> +			#    error: unknown option for 'stash push': --blah-blah
> +			#           To provide a message, use git stash push -- '--blah-blah'
> +			eval_gettextln "error: unknown option for 'stash push': \$option
> +       To provide a message, use git stash push -- '\$option'"

And here, too?

-Peff

  parent reply index

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 20:00 Thomas Gummerer
2017-10-05 20:10 ` [PATCH 2/1] mention git stash push first in the man page Thomas Gummerer
2017-10-17  4:14   ` Jeff King
2017-10-17 21:45     ` Thomas Gummerer
2017-10-17 21:47       ` Jeff King
2017-10-19 18:08         ` Thomas Gummerer
2017-10-20  8:04           ` Robert P. J. Day
2017-10-21  6:20             ` Jeff King
2017-10-21  6:43               ` Robert P. J. Day
2017-10-12  0:56 ` [RFC] deprecate git stash save? Junio C Hamano
2017-10-12 11:14   ` Junio C Hamano
2017-10-16 18:19     ` Thomas Gummerer
2017-10-17  4:13 ` Jeff King [this message]
2017-10-17 21:47   ` [RFC] deprecate git stash save? (was: Re: [PATCH 2/3] http-push: fix construction of hex value from path) Thomas Gummerer
2017-10-19 18:33 ` [PATCH v2 1/2] replace git stash save with git stash push in the documentation Thomas Gummerer
2017-10-19 18:33   ` [PATCH v2 2/2] mark git stash push deprecated in the man page Thomas Gummerer
2017-10-21  6:28     ` Jeff King
2017-10-22 16:31       ` Thomas Gummerer
2017-10-22 17:04     ` [PATCH v3 0/3] deprecate git stash save Thomas Gummerer
2017-10-22 17:04       ` [PATCH v3 1/3] replace git stash save with git stash push in the documentation Thomas Gummerer
2017-10-22 17:04       ` [PATCH v3 2/3] mark git stash push deprecated in the man page Thomas Gummerer
2017-10-22 17:04       ` [PATCH v3 3/3] stash: remove now superfluos help for "stash push" Thomas Gummerer
2017-10-23  0:39       ` [PATCH v3 0/3] deprecate git stash save Jeff King
2017-10-23  1:19       ` Junio C Hamano
2017-10-23  5:18         ` Jeff King
2017-10-23  6:26           ` Junio C Hamano
2017-10-23  5:47         ` Robert P. J. Day
2017-10-23  1:32       ` Junio C Hamano
2017-10-21  6:26   ` [PATCH v2 1/2] replace git stash save with git stash push in the documentation Jeff King
2017-10-22 16:28     ` Thomas Gummerer

Reply instructions:

You may reply publically 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=20171017041332.ooybecmonvssko2k@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=t.gummerer@gmail.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

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox