git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 0/2] Fix regression: CamelCased aliases
Date: Fri, 14 Jul 2017 05:02:56 -0400	[thread overview]
Message-ID: <20170714090256.ne4gqgppt2qshtak@sigill.intra.peff.net> (raw)
In-Reply-To: <cover.1500021526.git.johannes.schindelin@gmx.de>

On Fri, Jul 14, 2017 at 10:39:24AM +0200, Johannes Schindelin wrote:

> It was possible before v2.13.3 to invoke:
> 
> 	git config alias.CamelCased <something>
> 	git CamelCased
> 
> This regressed (due to a stupid mistake of mine that was not caught in
> patch review, sadly) in v2.13.3.

Interesting. I don't think this was ever intended to work. Prior to
v2.2.0 it did not, and it was "fixed" inadvertently by 111791559
(alias.c: replace `git_config()` with `git_config_get_string()`,
2014-08-07).

It's a known limitation of the alias config scheme that it cannot
distinguish between "camelcase" and "CamelCase" (nor represent commands
with underscores or other characters that are invalid in a keyname). In
the long run we'd want to allow "alias.CamelCase.command" or similar to
make this work correctly.

It probably doesn't hurt anything to make this old ambiguous style work
in the meantime if people are using it and finding it convenient.

> Johannes Schindelin (2):
>   t1300: demonstrate that CamelCased aliases regressed
>   alias: compare alias name *case-insensitively*

The patches look obviously correct.

As a meta-comment, I find splitting the tests from the fix like this
makes review more tedious. The commit messages have to repeat the exact
same reasoning.

The only value I think it brings is that you can confirm in the
first commit that the expect_failure does indeed fail. I guess that has
some value, though I usually do it by running the test against the
version of git built from HEAD^.

-Peff

  parent reply	other threads:[~2017-07-14  9:03 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 ` Jeff King [this message]
2017-07-14 15:14   ` [PATCH 0/2] Fix regression: CamelCased aliases 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

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=20170714090256.ne4gqgppt2qshtak@sigill.intra.peff.net \
    --to=peff@peff.net \
    --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).