Re: git-stash: RFC: Adopt the default behavior to other commands

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

 



On Dec 17, 2007, at 12:03 PM, Sebastian Harl wrote:

Hi,

By default, git-stash (when called without any other arguments) creates a new stash. This is quite different to the behavior of most other Git commands (e.g. git-tag, git-branch, etc. do "list" by default). In order to improve
consistency git-stash should imho adopt this as well.

The creation of a new stash should not do any harm. However, I think that consistency is more important (iirc this has been mentioned in the current survey a couple of times) and doing "list" is (in general) the best default.


Hi Sebastian,
this topic has been brought up the ML several times already, and there seems to be some sort of consensus on the misbehavior of git stash and what the default should be (listing the stashes seems like a decent default action). The current behavior of git stash is very dangerous as the following frequently happens to new comers:
  $ git stash
  $ <hack on something else>
  $ git commit
  $ git stash apply
  $ git stash clean # Oops, typo, I just stashed my changes again
  $ git stash clear # Oops, I just lost my changed

Hopefully, Git gives you means to recover from this sort of error, but most of the time new comers don't know them and just assume they lost their work.

Whenever I use git stash, it gives me chills, because I know I can easily screw things up (even though now I know how to recover from this sort of "user error").

Cheers,

--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory


-
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