# Incorrect default for git stash?

8 messages from 2008-06-17 to 2008-06-23. Participants: Eric Raible, Junio C Hamano, Jeff King, patrick.higgins@cexp.com, しらいしななこ, David Kågedal.
Thread: https://gitlist.dev/t/14007

## Eric Raible, 2008-06-17 22:21

Subject: Incorrect default for git stash?
Message-ID: <loom.20080617T220852-922@post.gmane.org>
URL: https://gitlist.dev/e/loom.20080617T220852-922%40post.gmane.org

```
Does it bother anyone else that the default for
git stash is inconsistent with branch & tag?

git branch -> list branches
git tag    -> list tags
git stash  -> create a stash

I understand that branches & tags must explicitly named
and that stashes are by default automatically named.

But wouldn't it be less surprising to me if the default
was 'list' instead of 'save'?

- Eric

```

## patrick.higgins@cexp.com, 2008-06-17 22:29

Subject: RE: Incorrect default for git stash?
Message-ID: <911589C97062424796D53B625CEC0025E46170@USCOBRMFA-SE-70.northamerica.cexp.com>
URL: https://gitlist.dev/e/911589C97062424796D53B625CEC0025E46170%40USCOBRMFA-SE-70.northamerica.cexp.com
In-Reply-To: <loom.20080617T220852-922@post.gmane.org>

```
Eric Raible wrote:

> git branch -> list branches
> git tag    -> list tags
> git stash  -> create a stash

git commit -> list commits?
git checkout -> list checkouts?
git prune -> list prunes?
git pull -> list pullables?

Why would you expect stash to behave like branch and tag?

```

## Junio C Hamano, 2008-06-17 22:32

Subject: Re: Incorrect default for git stash?
Message-ID: <7v1w2v66ce.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v1w2v66ce.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <loom.20080617T220852-922@post.gmane.org>

```
Eric Raible <raible@gmail.com> writes:

> Does it bother anyone else that the default for
> git stash is inconsistent with branch & tag?
>
> git branch -> list branches
> git tag    -> list tags
> git stash  -> create a stash
>
> I understand that branches & tags must explicitly named
> and that stashes are by default automatically named.
>
> But wouldn't it be less surprising to me if the default
> was 'list' instead of 'save'?
>
> - Eric

Read the whole thread:

http://thread.gmane.org/gmane.comp.version-control.git/63566/focus=63784

```

## Jeff King, 2008-06-17 22:32

Subject: Re: Incorrect default for git stash?
Message-ID: <20080617223205.GA10830@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20080617223205.GA10830%40sigill.intra.peff.net
In-Reply-To: <loom.20080617T220852-922@post.gmane.org>

```
On Tue, Jun 17, 2008 at 10:21:23PM +0000, Eric Raible wrote:

> Does it bother anyone else that the default for
> git stash is inconsistent with branch & tag?
> 
> git branch -> list branches
> git tag    -> list tags
> git stash  -> create a stash
> 
> I understand that branches & tags must explicitly named
> and that stashes are by default automatically named.
> 
> But wouldn't it be less surprising to me if the default
> was 'list' instead of 'save'?

I don't know if it still bothers people, but this was discussed when
stash was first merged:

  http://kerneltrap.org/mailarchive/git/2007/7/1/250414

-Peff

```

## Eric Raible, 2008-06-17 22:44

Subject: Re: Incorrect default for git stash?
Message-ID: <loom.20080617T224138-913@post.gmane.org>
URL: https://gitlist.dev/e/loom.20080617T224138-913%40post.gmane.org
In-Reply-To: <7v1w2v66ce.fsf@gitster.siamese.dyndns.org>

```
Junio C Hamano <gitster <at> pobox.com> writes:
 
> Read the whole thread:
> 
> http://thread.gmane.org/gmane.comp.version-control.git/63566/focus=63784

I'm glad to know that that was already hashed out, even if it
didn't end up the way I would have decided.

Thanks for the pointer.

```

## しらいしななこ, 2008-06-17 23:12

Subject: Re: Incorrect default for git stash?
Message-ID: <200806172312.m5HNCpWN002685@mi0.bluebottle.com>
URL: https://gitlist.dev/e/200806172312.m5HNCpWN002685%40mi0.bluebottle.com
In-Reply-To: <loom.20080617T224138-913@post.gmane.org>

```
Quoting Eric Raible <raible@gmail.com>:

> Junio C Hamano <gitster <at> pobox.com> writes:
>  
>> Read the whole thread:
>> 
>> http://thread.gmane.org/gmane.comp.version-control.git/63566/focus=63784
>
> I'm glad to know that that was already hashed out, even if it
> didn't end up the way I would have decided.

Then I suspect you did not read the whole thread, as we have not "ended up"
in anywhere yet.

In particular, in

  http://thread.gmane.org/gmane.comp.version-control.git/63566/focus=63781

Junio maps out the next steps for people, who would want the behavior of
the command changed, to take.  None of these follow-up steps have been
taken by people who wanted to change the behavior of the command.

I can well imagine an alternative to make the command "list" by default
when stash.defaultsave is set to false, and actually suggested it earlier
with a patch, but I think the list consensus was negative.

  http://thread.gmane.org/gmane.comp.version-control.git/68539/focus=69045

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

----------------------------------------------------------------------
Get a free email address with REAL anti-spam protection.
http://www.bluebottle.com/tag/1

```

## Eric Raible, 2008-06-18 00:37

Subject: Re: Incorrect default for git stash?
Message-ID: <loom.20080618T003534-588@post.gmane.org>
URL: https://gitlist.dev/e/loom.20080618T003534-588%40post.gmane.org
In-Reply-To: <200806172312.m5HNCpWN002685@mi0.bluebottle.com>

```
しらいしななこ <nanako3 <at> bluebottle.com> writes:

> Then I suspect you did not read the whole thread, as we have not "ended up"
> in anywhere yet.

You're right, of course.

I was hasty in my gmail, and was referring to
http://article.gmane.org/gmane.comp.version-control.git/85337
when I made that comment.

Anyway, I don't care enough either, especially since Junio
claims to be "quietly rewriting git-stash in C".

- Eric

```

## David Kågedal, 2008-06-23 17:14

Subject: Re: Incorrect default for git stash?
Message-ID: <87tzfk9iph.fsf@lysator.liu.se>
URL: https://gitlist.dev/e/87tzfk9iph.fsf%40lysator.liu.se
In-Reply-To: <911589C97062424796D53B625CEC0025E46170@USCOBRMFA-SE-70.northamerica.cexp.com>

```
<Patrick.Higgins@cexp.com> writes:

> Eric Raible wrote:
>
>> git branch -> list branches
>> git tag    -> list tags
>> git stash  -> create a stash
>
> git commit -> list commits?
> git checkout -> list checkouts?
> git prune -> list prunes?
> git pull -> list pullables?
>
> Why would you expect stash to behave like branch and tag?

Because is kindof does.

I would prefer to have two simple commands

  git stash
  git unstash

and not bother with named stashes etc (for that I use stgit or normal
branches). You'd need a way to clear the stash as well.

-- 
David Kågedal

```
