From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, jason.karns@gmail.com,
me@ttaylorr.com
Subject: Re: [PATCH v2] config: correct '**' matching in includeIf patterns
Date: Mon, 25 Mar 2019 22:40:33 +0100 (STD) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.1903252233580.41@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <20190324131755.26821-1-pclouds@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1691 bytes --]
Hi Duy,
On Sun, 24 Mar 2019, Nguyễn Thái Ngọc Duy wrote:
> diff --git a/t/t1305-config-include.sh b/t/t1305-config-include.sh
> index 635918505d..4d6e70c11d 100755
> --- a/t/t1305-config-include.sh
> +++ b/t/t1305-config-include.sh
> @@ -229,6 +229,19 @@ test_expect_success 'conditional include, early config reading' '
> )
> '
>
> +test_expect_success 'conditional include with /**/' '
> + mkdir foo/bar &&
This does assume that no previous test case created `bar`, but that `foo`
was created (which makes it harder to use `--run=<N>` for quicker
testing/debugging). It would be better to use
mkdir -p foo/bar &&
here. Or *even* better...
> + git init foo/bar/repo &&
... just drop the `mkdir foo/bar`, as `git init foo/bar/repo` has not the
slightest problem creating the intermediate directories.
> + (
> + cd foo/bar/repo &&
> + echo "[includeIf \"gitdir:**/foo/**/bar/**\"]path=bar7" >>.git/config &&
This line is longer than the 80 columns asked for in SubmittingPatches,
and while you have to wrap the line anyway, why not avoid the `cd`, too?
echo "[includeIf \"gitdir:**/foo/**/bar/**\"]path=bar7" \
>>foo/bar/repo/.git/config &&
echo "[test]seven=7" >foo/bar/repo/.git/bar7 &&
echo 7 >expect &&
git -C foo/bar/repo config test.seven >actual &&
test_cmp expect actual
Ciao,
Johannes
> + echo "[test]seven=7" >.git/bar7 &&
> + echo 7 >expect &&
> + git config test.seven >actual &&
> + test_cmp expect actual
> + )
> +'
> +
> test_expect_success SYMLINKS 'conditional include, set up symlinked $HOME' '
> mkdir real-home &&
> ln -s real-home home &&
> --
> 2.21.0.479.g47ac719cd3
>
>
next prev parent reply other threads:[~2019-03-25 21:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-14 17:30 [BUG] Suspected with double asterisk in conditional include pattern Jason Karns
2019-03-22 19:04 ` Taylor Blau
2019-03-23 3:45 ` [PATCH] config: correct '**' matching in includeIf patterns Nguyễn Thái Ngọc Duy
2019-03-24 12:56 ` Junio C Hamano
2019-03-24 13:17 ` [PATCH v2] " Nguyễn Thái Ngọc Duy
2019-03-25 2:30 ` Junio C Hamano
2019-03-25 21:40 ` Johannes Schindelin [this message]
2019-03-26 9:41 ` [PATCH v3] " Nguyễn Thái Ngọc Duy
2019-04-30 22:07 ` Jason Karns
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=nycvar.QRO.7.76.6.1903252233580.41@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jason.karns@gmail.com \
--cc=me@ttaylorr.com \
--cc=pclouds@gmail.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).