git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: ryenus <ryenus@gmail.com>
Cc: Git mailing list <git@vger.kernel.org>
Subject: Re: support comma-separated fetch specs list?
Date: Mon, 09 Nov 2020 14:45:31 -0800	[thread overview]
Message-ID: <xmqqsg9i9mk4.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: CAKkAvawVbyTPxDFQMEJMh+dzgQ_C0PXtbQKMo8xMNjgL_buGng@mail.gmail.com

ryenus <ryenus@gmail.com> writes:

> Maybe the cause is also my ignorance or lack of carefulness to read the
> docs, but searching for "comma separated list" in Git manual would
> return hundreds of results:
> https://www.google.com/search?q=%22comma+separated%22+list+site%3Agit-scm.com
>
> So I guess it's fair to expect it to work in the fetch spec as well?

I doubt it.

The contents of these "comma separated list" are taken from a fixed
vocabulary and not from unbounded set of things the end-user can
freely come up with that allows a comma as part of values.

In other words, "--option=ours,theirs" may make sense only because
we control the vocabulary 'common', 'ours', and 'theirs', and we
make sure the vocabulary does not contain any word with comma in it.

When somebody adds a new option, we try hard during the review not
to allow "--option=thing1,thing2,thing3" as the syntax we give at
the UI level where thing$n are end-user controlled values, because
that would rob end-users from the option of having a comma in their
thing$n (for whatever reason).  Certain kind of things naturally do
not make sense to contain comma in them (e.g. list of numbers, for
example) and we may allow end-user controlled input as part of a
comma separated tuple, and when the tuple has a fixed length whose
size will never change, we may allow end-user controlled thing as
the last element of such a comma-separated tuple, but extending that
to refspec, pathspec, etc. is a bit of stretch, I would have to say.




      reply	other threads:[~2020-11-09 22:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04  3:11 support comma-separated fetch specs list? ryenus
2020-11-04  5:41 ` Junio C Hamano
2020-11-07 10:11   ` ryenus
2020-11-09 22:45     ` Junio C Hamano [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=xmqqsg9i9mk4.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ryenus@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).