git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: astian <astian@eclipso.at>,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	git@vger.kernel.org
Subject: Re: [PATCH 0/2] Fix regression: CamelCased aliases
Date: Fri, 14 Jul 2017 17:01:35 -0700	[thread overview]
Message-ID: <xmqqzic6pnz4.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170714174002.xjizkofjxlirgnaj@sigill.intra.peff.net> (Jeff King's message of "Fri, 14 Jul 2017 13:40:02 -0400")

Jeff King <peff@peff.net> writes:

>> There is also this:
>> 
>>   $ git branch
>>   * master
>>   $ git BRANCH
>>   git: 'BRANCH' is not a git command. See 'git --help'.
>>   $ git config alias.branch 'branch -v'
>>   $ git branch
>>   * master
>>   $ git BRANCH
>>   * master 51c785c initial
>
> That is an interesting side effect, especially the latter BRANCH/branch
> one. We usually do not allow overrides of actual git commands, but this
> "fools" that check.

This one is tricky.  An obvious fix would be, because users expect
that their aliases are case insensitive, the rule that forbids and
ignores an alias that masks a real git subcommand should also apply
case insensitively.  But that opens another can of worms.  If "git
Branch" is forbidden to be an alias, it should not just fail but
invoke "git branch", which would mean that Git subcommands should
also be looked up case insensitively!  I am not sure if we want to
go there.

> I agree it's an unexpected fallout. On the other hand, unless you are
> _trying_ to do something funny, I don't think you'd ever hit on this
> behavior. And if you are trying to do something funny, I think this
> behaves in a reasonable and predictable manner.

OK.

      reply	other threads:[~2017-07-15  0:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-14  8:39 [PATCH 0/2] Fix regression: CamelCased aliases Johannes Schindelin
2017-07-14  8:39 ` [PATCH 1/2] t1300: demonstrate that CamelCased aliases regressed Johannes Schindelin
2017-07-14  8:39 ` [PATCH 2/2] alias: compare alias name *case-insensitively* Johannes Schindelin
2017-07-14  9:02 ` [PATCH 0/2] Fix regression: CamelCased aliases Jeff King
2017-07-14 15:14   ` Junio C Hamano
2017-07-14 15:30     ` Jeff King
2017-07-14 16:33       ` Junio C Hamano
2017-07-14 17:26         ` astian
2017-07-14 17:40           ` Jeff King
2017-07-15  0:01             ` 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=xmqqzic6pnz4.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=astian@eclipso.at \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=peff@peff.net \
    /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).