From: Phil Hord <hordp@cisco.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, phil.hord@gmail.com,
Jeff King <peff@peff.net>,
konglu@minatec.inpg.fr,
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
Kong Lucien <Lucien.Kong@ensimag.imag.fr>,
Duperray Valentin <Valentin.Duperray@ensimag.imag.fr>,
Jonas Franck <Franck.Jonas@ensimag.imag.fr>,
Nguy Thomas <Thomas.Nguy@ensimag.imag.fr>
Subject: Re: [PATCHv3 3/4] git-status: show short sequencer state
Date: Wed, 14 Nov 2012 08:44:32 -0500 [thread overview]
Message-ID: <50A3A040.7040304@cisco.com> (raw)
In-Reply-To: <7vy5i4b9d8.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Phil Hord <hordp@cisco.com> writes:
>
>>> Do you think '--tree-state' is an acceptable switch or do you have other
>>> suggestions?
>> I've been calling these 'tokens' myself. A token is a word-or-phrase I
>> can parse easily with the default $IFS, for simpler script handling.
> That name may be good for variables, but it is good only because you
> as the implementor know what purpose the tokens are used for.
> Instead of having to call them with a longer name, e.g. "state
> tokens", only because you know that these tokens represent tree-wide
> (as opposed to per-file) state, you can call them "tokens" in your
> implementation (and in your head) without confusing yourself.
>
> To the end users who should not care about the implementation
> detail, it is not a good name at all. The UI should surface the
> purpose, i.e. what these tokens are used for, (e.g. to represent
> tree-wide state) more than the fact that you happened to represent
> them with a single short word (i.e. "token").
>
> So --show-tree-state, --include-tree-state-in-the-output or
> something along that line that tells the user what the option is
> about is more preferable than --token. After all, you may want to
> use tokens to represent different kind of information in a later
> topic that is not about a tree-wide state, and you will regret that
> you used --token for this particular feature at that time.
I don't think I would regret it at all. I do not expect to conflate the
word "tokens" with the meaning "show-tree-state". It only has this
meaning because it is part 'git status'. If I want to show a different
kind of tokens in the future, I think "--tokens" would still work fine
there. It would even have precedent.
Consider the usage:
git status # show work-tree status
git status --short # show short work-tree status
git status --tokens # show work-tree status in token form
In the future if someone adds a similar operation to another command,I
do not think it would be confusing if it had a similar result.
git log --tokens
git show-ref --tokens HEAD
But maybe "--tokens" has some better meaning that someone will want to
use in the future. I'm not married to it. But "git status" already
means "Show the working tree status". So "git status --show-tree-state"
sounds redundant or meaningless.
'git status' already recognizes switches --ignored and --branch, for
example, to add extra state information to the output. I want to add
"tree-state tokens" to the list. But I don't know a better name for them.
Perhaps "--show-tree-state" is sufficient. Still sounds redundant to me.
Phil
next prev parent reply other threads:[~2012-11-14 13:44 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 20:02 [PATCHv2] git-status: show short sequencer state Phil Hord
2012-10-23 20:02 ` Phil Hord
2012-10-25 9:29 ` Jeff King
2012-10-25 16:05 ` Phil Hord
2012-10-29 18:05 ` Phil Hord
2012-10-29 21:41 ` Jeff King
2012-10-29 22:26 ` Phil Hord
2012-10-29 23:31 ` [PATCHv2 0/3] git-status short sequencer state info Phil Hord
2012-10-29 23:31 ` [PATCHv2 1/3] Refactor print_state into get_state Phil Hord
2012-10-29 23:31 ` [PATCHv2 2/3] wt-status: More state retrieval abstraction Phil Hord
2012-10-29 23:31 ` [PATCHv2 3/3] git-status: show short sequencer state Phil Hord
2012-11-09 18:56 ` [PATCHv3 0/4] git-status short sequencer state info Phil Hord
2012-11-09 18:56 ` [PATCHv3 1/4] Refactor print_state into get_state Phil Hord
2012-11-12 18:29 ` Ramkumar Ramachandra
2012-11-09 18:56 ` [PATCHv3 2/4] wt-status: Teach sequencer advice to use get_state Phil Hord
2012-11-09 18:56 ` [PATCHv3 3/4] git-status: show short sequencer state Phil Hord
2012-11-12 17:45 ` Junio C Hamano
2012-11-12 18:14 ` Phil Hord
2012-11-13 23:50 ` Phil Hord
2012-11-14 13:29 ` Junio C Hamano
2012-11-14 13:44 ` Phil Hord [this message]
2012-11-14 17:44 ` Junio C Hamano
2012-11-14 19:14 ` Phil Hord
2012-11-14 19:35 ` Junio C Hamano
2012-11-14 19:57 ` Junio C Hamano
2012-11-09 18:56 ` [PATCHv3 4/4] Add tests for git-status --sequencer Phil Hord
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50A3A040.7040304@cisco.com \
--to=hordp@cisco.com \
--cc=Franck.Jonas@ensimag.imag.fr \
--cc=Lucien.Kong@ensimag.imag.fr \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=Thomas.Nguy@ensimag.imag.fr \
--cc=Valentin.Duperray@ensimag.imag.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=konglu@minatec.inpg.fr \
--cc=peff@peff.net \
--cc=phil.hord@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).