git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Angelo Borsotti <angelo.borsotti@gmail.com>,
	Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
	git@vger.kernel.org
Subject: Re: checkout extra files
Date: Mon, 10 Sep 2012 16:11:15 -0400	[thread overview]
Message-ID: <20120910201115.GB32437@sigill.intra.peff.net> (raw)
In-Reply-To: <7vhar5oemu.fsf@alter.siamese.dyndns.org>

On Mon, Sep 10, 2012 at 12:35:05PM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > I would argue the opposite; if it is about a specific point, then put it
> > with the point. Otherwise, you are asking the reader to remember back to
> > an earlier point (that they may not even have read; in reference
> > documentation, the point of a list is often to let readers skip from
> > bullet to bullet easily).
> 
> You need to follow all the rules when composing your command line.
> You cannot simply ignore ones that are inconvenient for you and pick
> only the one you like.

Of course. But note that I said "reference documentation". It is quite
frequent that you have read it a long time ago, or understand already
most of what it is saying, and you are re-reading it again looking for
rules about a _specific_ element (say, wildcards). You might not have
just now read the bit about disambiguation, but you do not need to; you
already know it, or it might not be relevant to what you are doing.

> The second and the third one are related in the "sides of the same
> coin" sense; you either have "--" in which case no disambiguation
> checks are done, or don't in which case your command line may get an
> ambiguity error, so in that sense, you could say "I am writing '--',
> so point C does not apply to me and I skip".  But whether you do or
> do not say '--', you have to have your revs before pathspecs, so you
> cannot skip point A.

I think we need to be realistic about the readers of our documentation.
Sometimes people will sit down and read all the way through, and we need
the text to flow and make sense for that case. But just as often, they
will be curious about one specific point, and we need to make it as easy
as possible for them to see when a new point is being made, and when
they can stop reading because they have wandered into a new point that
they may already know.

Which is why I think the best thing we can do for such a casual reader
is make sure that the typography helps group related text together. In
this specific example, imagine I am a seasoned Unix user and a new git
user. If I were reading about "--" and revs versus paths, that would be
news to me, because it is about git. When I see the next bullet is about
quoting "*" to pass it through the shell to git, I say "Of course. That
is how Unix shells work" and stop reading. It seems like a disservice to
the reader to include more on the "--" disambiguation _after_ that
bullet point.

> So I do not think a bullet list is designed to let the readers skip
> and forget (or "may not even have read").  If that is the case,
> perhaps we would need to use something else to give the set of rules
> that apply to the command line here.

I think it is OK here. As a tool for people reading the whole text, I
think the list is a bad format, since the elements do not follow a good
parallel structure (as you said, the second and third are much more
related than the first and fourth).

So I was tempted to suggest removing the list altogether and turning it
into paragraphs.

But as I said, I think breaking the points with whitespace helps the
casual reader using it as a reference. I'm not sure you agree, but maybe
what I've written above will change that. If not, I think I've said as
much as is useful on the matter and I'll stop talking. :)

> I think the following is probably the best.
> 
>     * A (revs and then paths)
>     * B (with "--", no dwim is done).
>     * C (without "--", disambiguation kicks in. By the way, this
>       means your script had better avoid this form; make sure you
>       use "--").
>     * D (pathspecs are patterns).
> 
> without the trailing paragraph, which is meant only for people who
> write their script without using "--" by mistake, i.e. it only
> belongs to point C.

Hmph. Isn't that what I suggested in my first email? :P

I am fine with the series you sent.

-Peff

  parent reply	other threads:[~2012-09-10 20:11 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-03 13:42 checkout extra files Angelo Borsotti
2012-09-03 13:55 ` Carlos Martín Nieto
     [not found]   ` <CAB9Jk9AkFW-fAqOZuhCMgMBdEZwDpe5ZG9Dkse=Wz_x9LvJEPw@mail.gmail.com>
2012-09-03 14:47     ` Carlos Martín Nieto
     [not found]       ` <CAB9Jk9BjO+HdxhaGxEyaDoXgGisi0QpuVvsx3dZUnJV1VoKN1g@mail.gmail.com>
2012-09-04  1:57         ` Carlos Martín Nieto
2012-09-03 13:59 ` Nguyen Thai Ngoc Duy
2012-09-03 19:36   ` Junio C Hamano
2012-09-04  1:49     ` Nguyen Thai Ngoc Duy
2012-09-04  2:55       ` Junio C Hamano
2012-09-04  7:15         ` Angelo Borsotti
2012-09-04  8:53           ` Junio C Hamano
2012-09-04 14:30           ` Junio C Hamano
2012-09-04 16:15             ` Junio C Hamano
2012-09-07 20:49               ` Junio C Hamano
     [not found]                 ` <CAB9Jk9BtZzgi32kxVTbGC7eAjFG41bdae=MaK==sKq=9ohf8_w@mail.gmail.com>
2012-09-08 18:54                   ` Junio C Hamano
2012-09-10  0:24                     ` Junio C Hamano
2012-09-08 20:40                 ` Philip Oakley
2012-09-09  3:31                   ` Junio C Hamano
2012-09-09 13:48                     ` Matthieu Moy
2012-09-09 18:23                       ` Junio C Hamano
2012-09-09 23:25                         ` Philip Oakley
2012-09-10 16:19                 ` Jeff King
2012-09-10 17:09                   ` Junio C Hamano
2012-09-10 17:19                     ` Jeff King
2012-09-10 19:35                       ` Junio C Hamano
2012-09-10 19:53                         ` [PATCH 1/2] gitcli: formatting fix Junio C Hamano
2012-09-10 19:54                           ` [PATCH 2/2] gitcli: contrast wildcard given to shell and to git Junio C Hamano
2012-09-10 20:11                         ` Jeff King [this message]
2012-09-10 20:34                           ` checkout extra files Junio C Hamano
2012-09-04 10:14         ` Nguyen Thai Ngoc Duy
     [not found]           ` <CAB9Jk9CNYr6LfWvyVqXvHjh7dzhUAuzkufqO9YMeOXg08D2cJw@mail.gmail.com>
     [not found]             ` <CACsJy8AUYigHVKjzE-0NT0hnOrQWdufN+COmkk=2Q8L1Rimytw@mail.gmail.com>
2012-09-04 13:24               ` Angelo Borsotti
2012-09-04 16:49                 ` Junio C Hamano
2012-09-04 19:29                   ` Angelo Borsotti
2012-09-04 20:44                     ` Junio C Hamano
2012-09-04 22:53                       ` Philip Oakley
2012-09-04 23:31                         ` Junio C Hamano
2012-09-04 15:31           ` Junio C Hamano

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=20120910201115.GB32437@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=angelo.borsotti@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@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.
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 NNTP newsgroup(s).