From: Patrick Steinhardt <ps@pks.im>
To: me@black-desk.cn
Cc: git@vger.kernel.org,
Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v3 1/2] config: refactor include_by_gitdir() into include_by_path()
Date: Tue, 12 May 2026 09:13:57 +0200 [thread overview]
Message-ID: <agLTNbrXvwLifhYi@pks.im> (raw)
In-Reply-To: <20260403-includeif-worktree-v3-1-109ce5782b03@black-desk.cn>
On Fri, Apr 03, 2026 at 03:02:28PM +0800, Chen Linxuan via B4 Relay wrote:
> From: Chen Linxuan <me@black-desk.cn>
>
> The include_by_gitdir() function matches the realpath of a given
> path against a glob pattern, but its interface is tightly coupled to
> the gitdir condition: it takes a struct config_options *opts and
> extracts opts->git_dir internally.
>
> Refactor it into a more generic include_by_path() helper that takes
> a const char *path parameter directly, and update the gitdir and
> gitdir/i callers to pass opts->git_dir explicitly. No behavior
> change, just preparing for the addition of a new worktree condition
> that will reuse the same path-matching logic with a different path.
Good preparatory step.
Patrick
next prev parent reply other threads:[~2026-05-12 7:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 7:02 [PATCH v3 0/2] includeIf: add "worktree" condition for matching working tree path Chen Linxuan
2026-04-03 7:02 ` Chen Linxuan via B4 Relay
2026-04-03 7:02 ` [PATCH v3 1/2] config: refactor include_by_gitdir() into include_by_path() Chen Linxuan
2026-04-03 7:02 ` Chen Linxuan via B4 Relay
2026-05-12 7:13 ` Patrick Steinhardt [this message]
2026-04-03 7:02 ` [PATCH v3 2/2] config: add "worktree" and "worktree/i" includeIf conditions Chen Linxuan
2026-04-03 7:02 ` Chen Linxuan via B4 Relay
2026-05-12 7:14 ` Patrick Steinhardt
2026-05-12 15:07 ` Phillip Wood
2026-05-12 16:09 ` Junio C Hamano
2026-05-13 2:55 ` Chen Linxuan
2026-05-13 2:47 ` Chen Linxuan
2026-05-13 5:56 ` Patrick Steinhardt
2026-05-12 6:41 ` [PATCH v3 0/2] includeIf: add "worktree" condition for matching working tree path 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=agLTNbrXvwLifhYi@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kristofferhaugsbakk@fastmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.