git@vger.kernel.org mailing list mirror (one of many)
 help / Atom feed
From: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	Conrad Irwin <conrad.irwin@gmail.com>,
	Sitaram Chamarty <sitaramc@gmail.com>,
	Michael J Gruber <git@drmicha.warpmail.net>,
	Jeff King <peff@peff.net>, Richard Hansen <rhansen@bbn.com>,
	"Brian M . Carlson" <sandals@crustytoothpaste.net>
Subject: Re: [PATCH] rev-parse: match @{u}, @{push} and ^{<type>} case-insensitively
Date: Sun, 19 Mar 2017 11:04:35 +0100
Message-ID: <CACBZZX6AwBBHPN9-2ADrNXLh82YMVmgj94m-hn_WX_R0yjhcxw@mail.gmail.com> (raw)
In-Reply-To: <CACsJy8CV=9PoH6QHCeznJ4DFLJN5w1a74X3f4raqrh4zBzCe4Q@mail.gmail.com>

On Sun, Mar 19, 2017 at 10:19 AM, Duy Nguyen <pclouds@gmail.com> wrote:
> On Sun, Mar 19, 2017 at 5:34 AM, Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
>> diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
>> index ba11b9c95e..55bde6ea65 100644
>> --- a/Documentation/revisions.txt
>> +++ b/Documentation/revisions.txt
>> @@ -96,7 +96,8 @@ some output processing may assume ref names in UTF-8.
>>    refers to the branch that the branch specified by branchname is set to build on
>>    top of (configured with `branch.<name>.remote` and
>>    `branch.<name>.merge`).  A missing branchname defaults to the
>> -  current one.
>> +  current one. Both '@\{upstream\}', '@\{u\}' are case-insensitive, so e.g.
>> +  '@\{UPSTREAM\}', '@\{U\}' or '@\{Upstream\}' also work.
>
> Since this change makes @{everything} case-insensitive and there's no
> new one on the horizon, can we just say "everything in @{..} is
> case-insensitive unless otherwise specified" and not updating every
> @{case}? It sets a new common rule for these @{}, which I think is
> good (easier to remember as a user).

I have a slight bias to keeping it the way it is, just because of the
distracted user in a hurry use-case that's looking up only @{u} and
not reading the manpage all the way through.

But yeah, I could do that, i.e. have some blurb at the top noting that
all of the magical syntax is case insensitive unless otherwise noted.
AFAICT the only thing that's case sensitive now is the ^{/regex} form.

Also an advantage of that would be that currently we don't note that
e.g. sha1s like dae86e aren't case sensitive and can be written like
DAE86E, and the @{<date>} syntax doesn't note that it's case
insensitive. A blurb at the top would cover that.

  reply index

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-18 22:34 Ævar Arnfjörð Bjarmason
2017-03-19  9:19 ` Duy Nguyen
2017-03-19 10:04   ` Ævar Arnfjörð Bjarmason [this message]
2017-03-19 12:55 ` Junio C Hamano
2017-03-19 14:26   ` Ævar Arnfjörð Bjarmason
2017-03-19 22:53     ` Junio C Hamano
2017-03-26 12:16       ` [PATCH v2 0/3] rev-parse case insensitivity & @{p} synonym Ævar Arnfjörð Bjarmason
2017-03-26 12:16       ` [PATCH v2 1/3] rev-parse: match @{upstream}, @{u} and @{push} case-insensitively Ævar Arnfjörð Bjarmason
2017-03-27  0:27         ` Junio C Hamano
2017-03-27 11:16           ` [PATCH v3] " Ævar Arnfjörð Bjarmason
2017-03-27 17:45             ` Junio C Hamano
2017-03-27 18:05               ` Ævar Arnfjörð Bjarmason
2017-03-26 12:16       ` [PATCH v2 2/3] rev-parse: add @{p} as a synonym for @{push} Ævar Arnfjörð Bjarmason
2017-03-27  2:53         ` Jeff King
2017-03-27  7:52           ` Ævar Arnfjörð Bjarmason
2017-03-26 12:16       ` [PATCH v2 3/3] rev-parse: match ^{<type>} case-insensitively Ævar Arnfjörð Bjarmason
2017-03-27  0:36         ` Junio C Hamano
2017-03-27  2:58           ` Jeff King
2017-03-27  5:39             ` Junio C Hamano
2017-03-27  7:11               ` Jeff King
2017-03-27  7:33             ` Ævar Arnfjörð Bjarmason
2017-03-21 19:19 ` [PATCH] rev-parse: match @{u}, @{push} and " Ævar Arnfjörð Bjarmason
2017-03-21 19:26   ` Junio C Hamano
2017-03-21 19:43   ` Jeff King

Reply instructions:

You may reply publically 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=CACBZZX6AwBBHPN9-2ADrNXLh82YMVmgj94m-hn_WX_R0yjhcxw@mail.gmail.com \
    --to=avarab@gmail.com \
    --cc=conrad.irwin@gmail.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    --cc=rhansen@bbn.com \
    --cc=sandals@crustytoothpaste.net \
    --cc=sitaramc@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

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox