git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/2] Fix regression: CamelCased aliases

From
Jeff King <peff@peff.net>
Date
Jul 14, 2017, 09:02 UTC
Message-ID
<20170714090256.ne4gqgppt2qshtak@sigill.intra.peff.net>
In-Reply-To
<cover.1500021526.git.johannes.schindelin@gmx.de>
On Fri, Jul 14, 2017 at 10:39:24AM +0200, Johannes Schindelin wrote:
Show 7 quoted lines
> 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
Previous: Johannes SchindelinNext: Junio C Hamano
Message 4 of 10 in “Fix regression: CamelCased aliases”
  1. 0/2 Fix regression: CamelCased aliasesJohannes Schindelin, Jul 14, 2017
  2. 1/2 t1300: demonstrate that CamelCased aliases regressedJohannes Schindelin, Jul 14, 2017
  3. 2/2 alias: compare alias name *case-insensitively*Johannes Schindelin, Jul 14, 2017
  4. Jeff KingJul 14, 2017
  5. Junio C HamanoJul 14, 2017
  6. Jeff KingJul 14, 2017
  7. Junio C HamanoJul 14, 2017
  8. astianJul 14, 2017
  9. Jeff KingJul 14, 2017
  10. Junio C HamanoJul 15, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.