[PATCH] git-stash: Make "save" the default operation again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---

	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


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux