git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Stas Bekman <stas@stason.org>
Cc: "Martin Ågren" <martin.agren@gmail.com>,
	"Git Mailing List" <git@vger.kernel.org>,
	"Jeff King" <peff@peff.net>
Subject: Re: git silently ignores include directive with single quotes
Date: Sat, 08 Sep 2018 22:02:59 +0200	[thread overview]
Message-ID: <87a7orrc3w.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <a76c94c6-9fd7-4ed0-be2d-6fc1d021f476@stason.org>


On Sat, Sep 08 2018, Stas Bekman wrote:

> On 2018-09-08 12:30 PM, Martin Ågren wrote:
>> Hi Stas
>>
>> On Sat, 8 Sep 2018 at 21:00, Stas Bekman <stas@stason.org> wrote:
>>> [include]
>>>         path = '../.gitconfig'
>
>> Actually, there is a test explicitly testing that 'missing include files
>> are ignored'. I couldn't find a motivation for this in 9b25a0b52e
>> (config: add include directive, 2012-02-06).
>
> And also to stress out, that the file is not missing.  At least in the
> world of unix, in particular its many shells, - command line arguments
> "xyz", 'xyz', xyz are often deemed to be the same if there are no spaces
> in the word. So that's why it took us a lot of trial and error to even
> consider the quotes in '../.gitconfig' as a problem. While git deems it
> different, to me:
>
>         path = '../.gitconfig'
>         path = "../.gitconfig"
>         path = ../.gitconfig
>
> appear to be the "same". So git needs to have a way to say otherwise.
>
> I realize I am going back to the issue of quoting here, after suggesting
> to ignore it. So to clarify I'm bringing it up only in the context of
> wanting git to tell the user what it wants, and not necessarily asking
> to support all the possible ways one could quote a filepath.

Aside from other issues here, in the "wold of unix" (not that we only
use the git config syntax on those sort of systems) you can't assume
that just because some quoting construct works in the shell, that it
works the same way in some random config format. If you look in your
/etc/ you'll find plenty of config formats where you can't use single,
double and no quotes interchangeably, so I don't see what hte confusion
is with that particular aspect of this.

Although as I mentioned in <87bm97rcih.fsf@evledraar.gmail.com> the fact
that we ignore missing includes definitely needs to be documented, but
that our quoting constructs in our config format behave like they do in
POSIX shells I see as a non-issue.

  reply	other threads:[~2018-09-08 20:03 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-08 18:58 git silently ignores include directive with single quotes Stas Bekman
2018-09-08 19:30 ` Martin Ågren
2018-09-08 19:44   ` Stas Bekman
2018-09-08 19:53   ` Stas Bekman
2018-09-08 20:02     ` Ævar Arnfjörð Bjarmason [this message]
2018-09-08 20:13       ` Stas Bekman
2018-09-08 20:28         ` Ævar Arnfjörð Bjarmason
2018-09-08 20:58           ` Stas Bekman
2018-09-09  2:51         ` Paul Smith
2018-09-09  2:57           ` Stas Bekman
2018-09-08 19:54   ` Ævar Arnfjörð Bjarmason
2018-09-08 20:04     ` Stas Bekman
2018-09-08 20:16       ` Ævar Arnfjörð Bjarmason
2018-09-08 21:14     ` Jeff King
2018-09-08 22:10       ` Ramsay Jones
2018-09-09  2:33         ` Jeff King
2018-09-11 20:36           ` Junio C Hamano
2018-09-11 20:57             ` Jeff King
2018-09-23 22:48               ` Stas Bekman
2018-09-24 21:08                 ` Ævar Arnfjörð Bjarmason
2018-09-24 23:20                   ` Stas Bekman
2018-09-24 22:24                 ` [PATCH 0/1] " Philip Oakley
2018-09-24 23:05                   ` Stas Bekman
2018-09-24 22:24                 ` [PATCH 1/1] config doc: highlight the name=value syntax Philip Oakley
2018-09-25 22:03                   ` Junio C Hamano
2018-09-08 22:32       ` git silently ignores include directive with single quotes Ævar Arnfjörð Bjarmason
2018-09-09  2:29         ` Jeff King
2018-09-08 21:22 ` Jeff King
2018-09-08 22:49   ` Stas Bekman
2018-09-09  2:30     ` Jeff King
2018-09-10 17:04   ` Junio C Hamano
2018-09-10 17:14     ` Jonathan Nieder
2018-09-10 18:30       ` Junio C Hamano
2018-09-10 18:35         ` Jonathan Nieder
2018-09-10 19:17           ` Junio C Hamano
2018-09-10 19:52             ` Stas Bekman
2018-09-10 20:10               ` 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

  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=87a7orrc3w.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=martin.agren@gmail.com \
    --cc=peff@peff.net \
    --cc=stas@stason.org \
    /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).