From: Jakub Narebski <jnareb@gmail•com>
To: Andreas Ericsson <ae@op5•se>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx•de>,
Sebastian Harl <sh@tokkee•org>,
Junio C Hamano <gitster@pobox•com>,
Benoit Sigoure <tsuna@lrde•epita.fr>,
git@vger•kernel.org
Subject: Re: git-stash: RFC: Adopt the default behavior to other commands
Date: Tue, 18 Dec 2007 07:40:54 -0800 (PST) [thread overview]
Message-ID: <m3lk7sovt0.fsf@roke.D-201> (raw)
In-Reply-To: <4767E717.2060902@op5.se>
Andreas Ericsson <ae@op5•se> writes:
> Johannes Schindelin wrote:
>> On Tue, 18 Dec 2007, Andreas Ericsson wrote:
>>> Johannes Schindelin wrote:
>>>
>>>> In the alternative, you could just scrap all those default
>>>> actions, showing synopses instead. For all commands, including
>>>> "git commit", "git log", "git fetch", etc.
>>>
>>> Like we do for the git wrapper, you mean? Yes, that would be one
>>> solution, although not a very good one for all commands.
>>
>> Exactly. Not a good one.
>>
>>> It's probably not a bad idea for commands where the primary use is
>>> something else than producing visual output though, such as tag or
>>> branch, but those handle creation/deletion of stuff, so the default
>>> action for them is to list stuff of the kind they operate on. I
>>> fail to see why stash should be any different.
>>
>> I also fail to see why stash should be any different. And that's why
>> I expect it to have a default operation, which is -- you guessed it --
>> "stash the changes!"
>
> Actually, I guessed "list the stashes".
>
>> If I am not sure what I am about to do, there is -- wonder of wonders --
>> the "-h" option! And indeed:
>> $ git stash -h
>> Usage: /home/gitte/bin/git-stash [ | save | list | show |
>> apply | clear | create ]
>> So what exactly was your point again?
>>
>
> My point is that it would be nice if all git commands that actually
> manipulate objects (create/delete/modify) had a safe default, and
> that experienced users such as yourself could endure the insufferable
> agony of retraining your fingers to type five more chars so that
> people won't have to get bitten by surprises.
Also for "git commit"?
In my opinion _basic_ usage of git-stash is simply using it with
one stash only: "git stash" / "git unstash" (i.e. "git stash apply";
by the way this is one (beside "git view") use case for builtin
predefined aliases). Using it with multiple stashes (only then
"git stash list" is needed) is advanced usage; and for advanced
usage longer form is preferred, I think.
"git branch", "git log" and "git remote" are horse of differenc color
because the _cannot_ function without name of branch/tag/remote given,
so hey provide "list" when no name was given.
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2007-12-18 15:41 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 11:03 git-stash: RFC: Adopt the default behavior to other commands Sebastian Harl
2007-12-17 22:32 ` Benoit Sigoure
2007-12-17 23:00 ` Junio C Hamano
2007-12-17 23:32 ` Benoit Sigoure
2007-12-18 0:31 ` Junio C Hamano
2007-12-18 10:59 ` Sebastian Harl
2007-12-18 12:33 ` Johannes Schindelin
2007-12-18 14:22 ` Andreas Ericsson
2007-12-18 14:47 ` Johannes Schindelin
2007-12-18 15:00 ` Andreas Ericsson
2007-12-18 15:15 ` Johannes Schindelin
2007-12-18 15:28 ` Andreas Ericsson
2007-12-18 15:40 ` Jakub Narebski [this message]
2007-12-18 16:06 ` Andreas Ericsson
2007-12-18 16:11 ` Johannes Schindelin
2007-12-18 17:40 ` Sergei Organov
2007-12-18 18:03 ` Johannes Schindelin
2007-12-18 23:31 ` Martin Langhoff
2007-12-18 15:28 ` Wincent Colaiuta
2007-12-18 15:42 ` Jörg Sommer
2007-12-18 22:13 ` Johannes Schindelin
2007-12-18 22:22 ` Junio C Hamano
2007-12-20 21:40 ` しらいしななこ
2007-12-20 22:31 ` Junio C Hamano
2007-12-21 7:59 ` Wincent Colaiuta
2007-12-21 8:40 ` しらいしななこ
2007-12-18 23:32 ` André Goddard Rosa
2007-12-18 23:41 ` Martin Langhoff
2007-12-19 7:33 ` Wincent Colaiuta
2007-12-19 7:46 ` Martin Langhoff
2007-12-19 8:29 ` Andreas Ericsson
2007-12-19 12:01 ` Johannes Schindelin
2007-12-19 12:07 ` Wincent Colaiuta
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=m3lk7sovt0.fsf@roke.D-201 \
--to=jnareb@gmail$(echo .)com \
--cc=Johannes.Schindelin@gmx$(echo .)de \
--cc=ae@op5$(echo .)se \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=sh@tokkee$(echo .)org \
--cc=tsuna@lrde$(echo .)epita.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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