{"thread":{"id":"66414","subject":"hostname: includeIf condition — anyone already working on this?","startedAt":"2026-09-28T23:44:04Z","lastAt":"2026-10-02T01:52:31Z","messageCount":6,"participants":["Isabella Caselli","Jeff King","Ignacio Encinas","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"553531","messageId":"CAK4AdTRdNEU8cLFQ_7A=CUUL6u6dc327rn_H-SeBBD_dD-K7PA@mail.gmail.com","threadId":"66414","inReplyTo":null,"subject":"hostname: includeIf condition — anyone already working on this?","fromName":"Isabella Caselli","fromEmail":"bellacaselli20@gmail.com","sentAt":"2026-09-28T23:43:49Z","receivedAt":"2026-09-28T23:44:04Z","isPatch":false,"body":"Hi all,\n\nI'm looking for a small, relatively simple first contribution to Git\nas part of an undergraduate thesis on community/contribution barriers,\nand I'd like to work on the \"hostname:\" includeIf condition requested\nin gitgitgadget/git#1665 [1]: matching includeIf on the machine's\nhostname, mainly for sharing dotfiles across machines, e.g.:\n\n    [includeIf \"hostname:laptop\"]\n        path = ~/.gitconfig-laptop\n\nI found a related proposal from 2022 for an includeIf condition based\non the operating system [2], which stalled over disagreements about\nnaming and case sensitivity. My understanding is that \"hostname:\" is a\nnarrower, separate condition (machine identity, not platform), so I\ndon't think it needs to revisit that discussion, but I wanted to check\nbefore starting:\n\n- Is it still relevant for the project?\n   - If yes, is anyone already working on this issue?\n- Any objection to the approach itself? The same machine can report\nits hostname differently depending on how it's set up — sometimes just\nthe short name, sometimes with the full network address attached to it\n— so it isn't obvious whether the condition should compare that value\nexactly as the system reports it, or normalize it somehow before\ncomparing.\n\nIf nobody is on it, I'll put together a small patch modeled on the\nexisting onbranch: condition (dispatch in config.c, tests in\nt1305-config-include.sh, docs in config.adoc).\n\nThanks,\nIsabella Caselli\n[1] https://github.com/gitgitgadget/git/issues/1665\n[2] https://patchwork.kernel.org/project/git/patch/pull.1429.v2.git.1669058388327.gitgitgadget@gmail.com/\n"},{"id":"553534","messageId":"20260929014415.GB1089022@coredump.intra.peff.net","threadId":"66414","inReplyTo":"CAK4AdTRdNEU8cLFQ_7A=CUUL6u6dc327rn_H-SeBBD_dD-K7PA@mail.gmail.com","subject":"Re: hostname: includeIf condition — anyone already working on this?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2026-09-29T01:44:15Z","receivedAt":"2026-09-29T01:44:17Z","isPatch":false,"body":"On Mon, Sep 28, 2026 at 08:43:49PM -0300, Isabella Caselli wrote:\n\n> I found a related proposal from 2022 for an includeIf condition based\n> on the operating system [2], which stalled over disagreements about\n> naming and case sensitivity. My understanding is that \"hostname:\" is a\n> narrower, separate condition (machine identity, not platform), so I\n> don't think it needs to revisit that discussion, but I wanted to check\n> before starting:\n> \n> - Is it still relevant for the project?\n>    - If yes, is anyone already working on this issue?\n\nI think it's a reasonable feature to have. I don't recall seeing anybody\nelse work on it recently (and a quick search of the list archive\nconfirms).\n\nBut see below.\n\n> - Any objection to the approach itself? The same machine can report\n> its hostname differently depending on how it's set up — sometimes just\n> the short name, sometimes with the full network address attached to it\n> — so it isn't obvious whether the condition should compare that value\n> exactly as the system reports it, or normalize it somehow before\n> comparing.\n\nYes, that is the tricky part. :) There were some patches in 2024:\n\n  https://lore.kernel.org/git/20240307205006.467443-1-ignacio@iencinas.com/\n\nwhere the issue came up. Based on my recollection and a quick skim of\nthe thread, I think the consensus was that it's OK to document that it\nis system-dependent whether we'll match against a short of fully\nqualified hostname. But exposing our view of the hostname via git-var\n(e.g., \"git var GIT_HOSTNAME\") might be a helpful debugging aid.\n\nIt looks like after review on v3 of the series we never saw more. I'd\nguess the author (cc'd) just never got around to pushing it forward.\n\n-Peff\n"},{"id":"553593","messageId":"DLRSIZ3JV2DF.10GG1YB2D8DHW@iencinas.com","threadId":"66414","inReplyTo":"20260929014415.GB1089022@coredump.intra.peff.net","subject":"Re: hostname: includeIf condition — anyone already working on this?","fromName":"Ignacio Encinas","fromEmail":"ignacio@iencinas.com","sentAt":"2026-09-29T12:14:34Z","receivedAt":"2026-09-29T12:14:48Z","isPatch":false,"body":"Hello,\n\nOn Tue Sep 29, 2026 at 2:44 AM IST, Jeff King wrote:\n> On Mon, Sep 28, 2026 at 08:43:49PM -0300, Isabella Caselli wrote:\n>\n>> - Any objection to the approach itself? The same machine can report\n>> its hostname differently depending on how it's set up — sometimes just\n>> the short name, sometimes with the full network address attached to it\n>> — so it isn't obvious whether the condition should compare that value\n>> exactly as the system reports it, or normalize it somehow before\n>> comparing.\n>\n> Yes, that is the tricky part. :) There were some patches in 2024:\n>\n>   https://lore.kernel.org/git/20240307205006.467443-1-ignacio@iencinas.com/\n>\n> where the issue came up. Based on my recollection and a quick skim of\n> the thread, I think the consensus was that it's OK to document that it\n> is system-dependent whether we'll match against a short of fully\n> qualified hostname. But exposing our view of the hostname via git-var\n> (e.g., \"git var GIT_HOSTNAME\") might be a helpful debugging aid.\n>\n> It looks like after review on v3 of the series we never saw more. I'd\n> guess the author (cc'd) just never got around to pushing it forward.\n\nThat's what happened. Similar to Isabella, I was looking for a small\ncontribution but it ended up being more complicated than expected. I got\na bit overwhelmed and decided to drop it.\n\nI kept wondering if I should have communicated that, so apologies if\nthat was the case.\n\nI hope the discussion from 2024 is at least helpful now if this ends up\nbeing implemented by Isabella.\n\nBest regards,\nIgnacio\n"},{"id":"553625","messageId":"20260929182850.GB1710046@coredump.intra.peff.net","threadId":"66414","inReplyTo":"DLRSIZ3JV2DF.10GG1YB2D8DHW@iencinas.com","subject":"Re: hostname: includeIf condition — anyone already working on this?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2026-09-29T18:28:50Z","receivedAt":"2026-09-29T18:28:51Z","isPatch":false,"body":"On Tue, Sep 29, 2026 at 01:14:34PM +0100, Ignacio Encinas wrote:\n\n> > Yes, that is the tricky part. :) There were some patches in 2024:\n> >\n> >   https://lore.kernel.org/git/20240307205006.467443-1-ignacio@iencinas.com/\n> >\n> > where the issue came up. Based on my recollection and a quick skim of\n> > the thread, I think the consensus was that it's OK to document that it\n> > is system-dependent whether we'll match against a short of fully\n> > qualified hostname. But exposing our view of the hostname via git-var\n> > (e.g., \"git var GIT_HOSTNAME\") might be a helpful debugging aid.\n> >\n> > It looks like after review on v3 of the series we never saw more. I'd\n> > guess the author (cc'd) just never got around to pushing it forward.\n> \n> That's what happened. Similar to Isabella, I was looking for a small\n> contribution but it ended up being more complicated than expected. I got\n> a bit overwhelmed and decided to drop it.\n> \n> I kept wondering if I should have communicated that, so apologies if\n> that was the case.\n\nNah, it's not a big deal. This is open source, so everybody is here\nvoluntarily, and it's normal for people to come in and out as time and\ninterest permits. Plus the very reason that people end up dropping a\nseries (getting overwhelmed) often makes it hard to decide whether and\nwhen to write the \"I'm dropping this\" email. :)\n\n> I hope the discussion from 2024 is at least helpful now if this ends up\n> being implemented by Isabella.\n\nYeah, I think there's a lot of good discussion there, and the patches\nthemselves can probably give a boost to another attempt. Even if we did\nnot finish it back then, thank you for the work so far.\n\n-Peff\n"},{"id":"553636","messageId":"xmqqa4ozg7dk.fsf@gitster.g","threadId":"66414","inReplyTo":"DLRSIZ3JV2DF.10GG1YB2D8DHW@iencinas.com","subject":"Re: hostname: includeIf condition — anyone already working on this?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-09-29T19:55:19Z","receivedAt":"2026-09-29T19:55:22Z","isPatch":false,"body":"\"Ignacio Encinas\" <ignacio@iencinas.com> writes:\n\n> On Tue Sep 29, 2026 at 2:44 AM IST, Jeff King wrote:\n> ...\n>> It looks like after review on v3 of the series we never saw more. I'd\n>> guess the author (cc'd) just never got around to pushing it forward.\n>\n> That's what happened. Similar to Isabella, I was looking for a small\n> contribution but it ended up being more complicated than expected. I got\n> a bit overwhelmed and decided to drop it.\n> ...\n> I hope the discussion from 2024 is at least helpful now if this ends up\n> being implemented by Isabella.\n\nI was re-reading the thread yesterday.  It looked like we were _so_\nclose to the finish line before the discussion stopped, which is a\nshame.  All the good bits were already designed and the only thing\nleft was to assemble and package them up.\n"},{"id":"553882","messageId":"CAK4AdTSnaAOk649a0GLe1M9C+cYuDa0Nwo54=HT47R53Q4ZdWw@mail.gmail.com","threadId":"66414","inReplyTo":"xmqqa4ozg7dk.fsf@gitster.g","subject":"Re: hostname: includeIf condition — anyone already working on this?","fromName":"Isabella Caselli","fromEmail":"bellacaselli20@gmail.com","sentAt":"2026-10-02T01:52:18Z","receivedAt":"2026-10-02T01:52:31Z","isPatch":false,"body":"Interesting, I didn't know there had already been a discussion\nabout this issue. Thank you, Jeff, for pointing me to the 2024 series.\n\nJunio C Hamano <gitster@pobox.com> writes:\n\n> \"Ignacio Encinas\" <ignacio@iencinas.com> writes:\n>\n>> That's what happened. Similar to Isabella, I was looking for a small\n>> contribution but it ended up being more complicated than expected. I got\n>> a bit overwhelmed and decided to drop it.\n>> ...\n>> I hope the discussion from 2024 is at least helpful now if this ends up\n>> being implemented by Isabella.\n\nIgnacio, if you don't mind, I'd like to continue the work based on\nyours and credit you when submitting the series.\n\n> I was re-reading the thread yesterday.  It looked like we were _so_\n> close to the finish line before the discussion stopped, which is a\n> shame.  All the good bits were already designed and the only thing\n> left was to assemble and package them up.\n\nThat's encouraging to hear! Sounds like a plan to go through the 2024\nthread, including Jeff's suggestion of exposing the hostname via \"git var\",\nand send an updated version of the series addressing the comments on v3.\n\nThanks,\nIsabella\n"}]}