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

hostname: includeIf condition — anyone already working on this?

From
ICIsabella Caselli <bellacaselli20@gmail.com>
Date
Sep 28, 2026, 23:43 UTC
Message-ID
<CAK4AdTRdNEU8cLFQ_7A=CUUL6u6dc327rn_H-SeBBD_dD-K7PA@mail.gmail.com>
Hi all,

I'm looking for a small, relatively simple first contribution to Git as part of an undergraduate thesis on community/contribution barriers, and I'd like to work on the "hostname:" includeIf condition requested in gitgitgadget/git#1665 [1]: matching includeIf on the machine's hostname, mainly for sharing dotfiles across machines, e.g.:

    [includeIf "hostname:laptop"]
        path = ~/.gitconfig-laptop

I found a related proposal from 2022 for an includeIf condition based on the operating system [2], which stalled over disagreements about naming and case sensitivity. My understanding is that "hostname:" is a narrower, separate condition (machine identity, not platform), so I don't think it needs to revisit that discussion, but I wanted to check before starting:

- Is it still relevant for the project?
   - If yes, is anyone already working on this issue?
- Any objection to the approach itself? The same machine can report
its hostname differently depending on how it's set up — sometimes just
the short name, sometimes with the full network address attached to it
— so it isn't obvious whether the condition should compare that value
exactly as the system reports it, or normalize it somehow before
comparing.

If nobody is on it, I'll put together a small patch modeled on the existing onbranch: condition (dispatch in config.c, tests in t1305-config-include.sh, docs in config.adoc).

Thanks, Isabella Caselli [1] https://github.com/gitgitgadget/git/issues/1665 [2] https://patchwork.kernel.org/project/git/patch/pull.1429.v2.git.1669058388327.gitgitgadget@gmail.com/

Next: Jeff King
Message 1 of 14 in “hostname: includeIf condition — anyone already working on this?”
  1. Isabella CaselliSep 28, 2026
  2. Jeff KingSep 29, 2026
  3. Ignacio EncinasSep 29, 2026
  4. Jeff KingSep 29, 2026
  5. Junio C HamanoSep 29, 2026
  6. Isabella CaselliOct 2, 2026
  7. 0/3 Add hostname condition to includeIfIsabella Caselli, Oct 12, 2026
  8. 1/3 var: add GIT_HOSTNAMEIsabella Caselli, Oct 12, 2026
  9. 2/3 t6500: get hostname from "git var"Isabella Caselli, Oct 12, 2026
  10. Junio C HamanoOct 12, 2026
  11. Isabella CaselliOct 13, 2026
  12. Junio C HamanoOct 13, 2026
  13. 3/3 config: learn the "hostname:" includeIf conditionIsabella Caselli, Oct 12, 2026
  14. Junio C HamanoOct 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.