From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com>
To: me@black-desk.cn, git@vger.kernel.org
Subject: Re: [PATCH 0/3] includeIf: add "worktree" condition for matching working tree path
Date: Wed, 01 Apr 2026 10:27:21 +0200 [thread overview]
Message-ID: <54592b30-0b48-4ec1-a413-903db846870e@app.fastmail.com> (raw)
In-Reply-To: <20260401-includeif-worktree-v1-0-906db69f2c79@black-desk.cn>
On Wed, Apr 1, 2026, at 09:33, Chen Linxuan via B4 Relay wrote:
> The `includeIf` mechanism already supports matching on the `.git`
> directory path (`gitdir`) and the currently checked out branch
> (`onbranch`). But in multi-worktree setups the `.git` directory of a
> linked worktree points into the main repository's `.git/worktrees/`
> area, which makes `gitdir` patterns cumbersome when one wants to
> include config based on the working tree's checkout path instead.
>
> Introduce two new condition keywords:
>
> - `worktree:<pattern>` matches the realpath of the current worktree's
> working directory against a glob pattern.
> - `worktree/i:<pattern>` is the case-insensitive variant.
>
> Supported pattern features: glob wildcards, `**/` and `/**`, `~`
> expansion, `./` relative paths, and trailing-`/` prefix matching.
> The condition never matches in a bare repository.
>
> Signed-off-by: Chen Linxuan <me@black-desk.cn>
The cover letter here is signed off (not necessary) but none of
the patches are.
> ---
>[snip]
prev parent reply other threads:[~2026-04-01 8:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 7:33 [PATCH 0/3] includeIf: add "worktree" condition for matching working tree path Chen Linxuan via B4 Relay
2026-04-01 7:33 ` [PATCH 1/3] config: add "worktree" and "worktree/i" includeIf conditions Chen Linxuan via B4 Relay
2026-04-01 7:33 ` [PATCH 2/3] Documentation/config: add includeIf "worktree" Chen Linxuan via B4 Relay
2026-04-01 7:33 ` [PATCH 3/3] t1305: add tests for " Chen Linxuan via B4 Relay
2026-04-01 8:27 ` Kristoffer Haugsbakk [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54592b30-0b48-4ec1-a413-903db846870e@app.fastmail.com \
--to=kristofferhaugsbakk@fastmail.com \
--cc=git@vger.kernel.org \
--cc=me@black-desk.cn \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox