From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jeff King <peff@peff.net>
Cc: "Junio C Hamano" <gitster@pobox.com>,
しらいしななこ <nanako3@bluebottle.com>, GIT <git@vger.kernel.org>
Subject: [PATCH] git-stash: Make "save" the default operation again
Date: Mon, 2 Jul 2007 11:44:29 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0707021141280.4438@racer.site> (raw)
In-Reply-To: <Pine.LNX.4.64.0707021129540.4438@racer.site>
The default operation really should be that which you are most likely
to use. And that _is_ to stash the current changes away. Indeed, quite
often you will want it to stash away changes you never plan to commit,
like extensive debugging output.
Sometimes you will stash away changes that you realize only later will
never be needed.
So, neither "list" nor "apply" are ase often used in practice as "save".
The manpage already reflects that, so change the script to the better.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
Think about it again. You tested git-stash. That is not the normal
modus operandi. You needed to inspect the stashed changes. In the
examples given in the manpage, you usually want to work with the
last stashed changes, if at all. So you _rarely_ inspect the
stashed changes. From my experience I agree.
If you make "list" the default, people will get used to _that_,
even if it means more typing, and quite a few "Aargh, I just
wanted to stash the current state, and I get a list instead!"
moments.
Then there is no way to change it back to some sane default
operation.
git-stash.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-stash.sh b/git-stash.sh
index ec18ef6..04ce30a 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -132,7 +132,7 @@ apply_stash () {
# Main command set
case "$1" in
-list | '')
+list)
shift
if test $# = 0
then
@@ -152,7 +152,7 @@ apply)
clear)
clear_stash
;;
-save)
+save|'')
save_stash && git-reset --hard
;;
*)
--
1.5.2.2.3293.gad30
next prev parent reply other threads:[~2007-07-02 10:44 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-30 1:29 [PATCH (2nd try)] Add git-stash script しらいしななこ
2007-06-30 2:05 ` Johannes Schindelin
2007-06-30 5:37 ` [PATCH (3rd " しらいしななこ
2007-06-30 6:12 ` Jeff King
2007-06-30 6:25 ` Junio C Hamano
2007-06-30 15:41 ` Johannes Schindelin
2007-06-30 17:19 ` Junio C Hamano
2007-06-30 23:27 ` しらいしななこ
2007-06-30 15:44 ` [PATCH] Add a manual page for git-stash Johannes Schindelin
2007-06-30 16:38 ` Frank Lichtenheld
2007-06-30 17:48 ` Johannes Schindelin
2007-06-30 18:45 ` Frank Lichtenheld
2007-06-30 17:44 ` Junio C Hamano
2007-06-30 17:56 ` Johannes Schindelin
2007-06-30 18:13 ` Junio C Hamano
2007-06-30 18:44 ` Johannes Schindelin
2007-07-01 5:26 ` [PATCH] Document git-stash しらいしななこ
2007-07-01 6:48 ` Junio C Hamano
2007-07-01 8:07 ` Jeff King
2007-07-01 8:38 ` Junio C Hamano
2007-07-01 9:06 ` しらいしななこ
[not found] ` <200707010910.l619A23c027837@mi0.bluebottle.com>
2007-07-01 9:19 ` Jeff King
2007-07-01 21:39 ` Junio C Hamano
2007-07-02 4:08 ` Jeff King
2007-07-01 21:54 ` Junio C Hamano
2007-07-01 22:57 ` Johannes Schindelin
2007-07-02 4:10 ` Jeff King
2007-07-02 10:33 ` Johannes Schindelin
2007-07-02 10:44 ` Johannes Schindelin [this message]
2007-07-02 11:00 ` [PATCH] git-stash: Make "save" the default operation again Jeff King
2007-07-02 11:15 ` Johannes Schindelin
2007-07-02 23:11 ` Junio C Hamano
2007-07-01 5:20 ` [PATCH] Add a manual page for git-stash Junio C Hamano
2007-06-30 16:06 ` [PATCH] Add tests " Johannes Schindelin
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=Pine.LNX.4.64.0707021141280.4438@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nanako3@bluebottle.com \
--cc=peff@peff.net \
/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).