git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: astian <astian@eclipso.at>
Cc: Junio C Hamano <gitster@pobox.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	git@vger.kernel.org
Subject: Re: [PATCH 0/2] Fix regression: CamelCased aliases
Date: Fri, 14 Jul 2017 13:40:02 -0400	[thread overview]
Message-ID: <20170714174002.xjizkofjxlirgnaj@sigill.intra.peff.net> (raw)
In-Reply-To: <1d79b017-38b3-e1cb-a4bf-1153dc4fdbca@eclipso.at>

On Fri, Jul 14, 2017 at 05:26:00PM +0000, astian wrote:

> FWIW, I don't like 2, I don't like the irregularity in the invocation:

Without quoting, it took me a second to figure out what you meant. But I
think "2" here is the "mental model 2" I mentioned in my earlier email.

>   $ git branch
>   * master
>   $ git BRANCH
>   git: 'BRANCH' is not a git command. See 'git --help'.
>   $ git config alias.br 'branch -v'
>   $ git br
>   * master 51c785c initial
>   $ git BR
>   * master 51c785c initial
> 
> 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.

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.

-Peff

  reply	other threads:[~2017-07-14 17:40 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 [this message]
2017-07-15  0:01             ` 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=20170714174002.xjizkofjxlirgnaj@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=astian@eclipso.at \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    /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).