git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <johannes.schindelin@gmx.de>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 1/2] t1300: demonstrate that CamelCased aliases regressed
Date: Fri, 14 Jul 2017 10:39:29 +0200 (CEST)	[thread overview]
Message-ID: <79af768e29d878da995df553638b18fc6d7a5190.1500021526.git.johannes.schindelin@gmx.de> (raw)
In-Reply-To: <cover.1500021526.git.johannes.schindelin@gmx.de>

It is totally legitimate to add CamelCased aliases, but due to the way
config keys are compared, the case does not matter.

Except that now it does: the alias name is expected to be all
lower-case. This is a regression introduced by a9bcf6586d1 (alias: use
the early config machinery to expand aliases, 2017-06-14).

Noticed by Alejandro Pauly, diagnosed by Kevin Willford.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t1300-repo-config.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index a37ef042221..0df71b84ccf 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -1075,6 +1075,13 @@ test_expect_success 'git -c works with aliases of builtins' '
 	test_cmp expect actual
 '
 
+test_expect_failure 'aliases can be CamelCased' '
+	test_config alias.CamelCased "rev-parse HEAD" &&
+	git CamelCased >out &&
+	git rev-parse HEAD >expect &&
+	test_cmp expect out
+'
+
 test_expect_success 'git -c does not split values on equals' '
 	echo "value with = in it" >expect &&
 	git -c core.foo="value with = in it" config core.foo >actual &&
-- 
2.13.3.windows.1.13.gaf0c2223da0



  reply	other threads:[~2017-07-14  8:39 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 ` Johannes Schindelin [this message]
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

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=79af768e29d878da995df553638b18fc6d7a5190.1500021526.git.johannes.schindelin@gmx.de \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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
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).