git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Philip Oakley <philipoakley@iee.org>
To: Johannes Sixt <j6t@kdbg.org>, "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: Git Mailing list <git@vger.kernel.org>
Subject: Re: "man gitattributes" doesn't explain comma-separated attribute values
Date: Mon, 18 Mar 2019 10:10:16 +0000	[thread overview]
Message-ID: <21e31142-ace2-71e1-8a36-1940c35eb24d@iee.org> (raw)
In-Reply-To: <6aeca231-c024-1063-0f8c-03276c83161c@kdbg.org>

On 17/03/2019 08:18, Johannes Sixt wrote:
> Am 16.03.19 um 23:09 schrieb Robert P. J. Day:
>> On Sat, 16 Mar 2019, Johannes Sixt wrote:
>>
>>> Am 16.03.19 um 13:22 schrieb Robert P. J. Day:
>>>>    as a working example, i looked at the top-level .gitattributes file
>>>> in the git source code itself, which opens with:
>>>>
>>>>    * whitespace=!indent,trail,space
>>>>    *.[ch] whitespace=indent,trail,space diff=cpp
>>>>    *.sh whitespace=indent,trail,space eol=lf
>>>>    ... snip ...
>>>>
>>>> first observation is that i see nothing in the man page that explains
>>>> the notion of a comma-separated list of attribute values.
>>> This comma-separated list is not a property of attributes in
>>> general, but a property of the whitespace attribute in particular.
>>> See core.whitespace in git-config(1) and "Checking whitespace
>>> errors" in gitattributes(5).
>>    ah, i was digging through the code trying to figure out where the
>> whole CSV thing was explained -- it's massively helpful to understand
>> that that property is specific to whitespace. that does not appear to
>> be clarified anywhere.
> But it is. The very first paragraph of gitattributes(5) states that
> attributes are whitespace separated. From this, conclude that the
> comma-separated list must pertain to the whitespace attribute.

I can't say that I follow that 'by omission'  argument. It is one of 
those argument types that sounds good in retrospect but is very hard for 
the unknowing reader to guess, especially as commas are widely taught as 
being one of the ubiquitous separators.

There is a similar issue with '/' in refs regarding the subtle 
distinctions between embedded characters that have a common convenience 
meaning vs the idea that they are all just a single whitespace separated 
string.

Given that, Robert may be able to suggest a short addendum that 
clarifies that the comma is processed elsewhere (IIUC).

>   Now
> follow the documentation of that, and you end up at core.whitespace in
> git-config(1). There you have it as the very first phrase.
>
> -- Hannes

-- 

Philip


      reply	other threads:[~2019-03-18 10:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-16 12:22 "man gitattributes" doesn't explain comma-separated attribute values Robert P. J. Day
2019-03-16 13:13 ` Ævar Arnfjörð Bjarmason
2019-03-16 13:48   ` Robert P. J. Day
2019-03-16 21:58 ` Johannes Sixt
2019-03-16 22:09   ` Robert P. J. Day
2019-03-17  8:18     ` Johannes Sixt
2019-03-18 10:10       ` Philip Oakley [this message]

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=21e31142-ace2-71e1-8a36-1940c35eb24d@iee.org \
    --to=philipoakley@iee.org \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=rpjday@crashcourse.ca \
    /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).