Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Chen Linxuan via B4 Relay <devnull+me.black-desk.cn@kernel.org>
Cc: git@vger.kernel.org,
	Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>,
	Patrick Steinhardt <ps@pks.im>, Chen Linxuan <me@black-desk.cn>,
	Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH v4 0/2] includeIf: add "worktree" condition for matching working tree path
Date: Mon, 25 May 2026 11:14:17 +0900	[thread overview]
Message-ID: <xmqqbje4grra.fsf@gitster.g> (raw)
In-Reply-To: <20260513-includeif-worktree-v4-0-f8e6212d1fba@black-desk.cn> (Chen Linxuan via's message of "Wed, 13 May 2026 16:08:16 +0800")

Chen Linxuan via B4 Relay <devnull+me.black-desk.cn@kernel.org>
writes:

> 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 test in this series fails in GitHub CI for Windows, it seems.

https://github.com/git/git/actions/runs/26377220573/job/77639885088


  parent reply	other threads:[~2026-05-25  2:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13  8:08 [PATCH v4 0/2] includeIf: add "worktree" condition for matching working tree path Chen Linxuan via B4 Relay
2026-05-13  8:08 ` [PATCH v4 1/2] config: refactor include_by_gitdir() into include_by_path() Chen Linxuan via B4 Relay
2026-05-13  8:08 ` [PATCH v4 2/2] config: add "worktree" and "worktree/i" includeIf conditions Chen Linxuan via B4 Relay
2026-05-13 13:59   ` Phillip Wood
2026-05-21 12:09   ` Patrick Steinhardt
2026-05-25  2:14 ` Junio C Hamano [this message]
2026-05-25  2:36   ` [PATCH v4 0/2] includeIf: add "worktree" condition for matching working tree path Chen Linxuan
2026-05-25  3: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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbje4grra.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=devnull+me.black-desk.cn@kernel.org \
    --cc=git@vger.kernel.org \
    --cc=kristofferhaugsbakk@fastmail.com \
    --cc=me@black-desk.cn \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=ps@pks.im \
    /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