git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 1/2] config: refactor include_by_gitdir() into include_by_path()

From
Patrick Steinhardt <ps@pks.im>
Date
May 12, 2026, 07:13 UTC
Message-ID
<agLTNbrXvwLifhYi@pks.im>
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:
Show 12 quoted lines
> 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
Previous: Chen Linxuan via B4 RelayNext: Chen Linxuan via B4 Relay
Message 3 of 11 in “includeIf: add "worktree" condition for matching working tree path”
  1. 0/2 includeIf: add "worktree" condition for matching working tree pathChen Linxuan via B4 Relay, Apr 3, 2026
  2. 1/2 config: refactor include_by_gitdir() into include_by_path()Chen Linxuan via B4 Relay, Apr 3, 2026
  3. Patrick SteinhardtMay 12, 2026
  4. 2/2 config: add "worktree" and "worktree/i" includeIf conditionsChen Linxuan via B4 Relay, Apr 3, 2026
  5. Patrick SteinhardtMay 12, 2026
  6. Phillip WoodMay 12, 2026
  7. Junio C HamanoMay 12, 2026
  8. Chen LinxuanMay 13, 2026
  9. Chen LinxuanMay 13, 2026
  10. Patrick SteinhardtMay 13, 2026
  11. Junio C HamanoMay 12, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.