From f908b10435c0ac6a4e78b028fba11d15d49b1046 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Tue, 15 Jul 2025 17:08:18 -0500 Subject: [PATCH] sam: Fix includeIf trailing slash This isn't a new issue; not even to me! https://news.ycombinator.com/item?id=38946967 > chandlerswift on Jan 11, 2024 | on: Conditional Git Configuration > > I'd attempted to configure this some time back, but never gotten it > working, and this was the kick in the pants I needed to finally get > it working! > > In case anyone is stuck in the same way that I was, the trailing > slash at the end (which I had previously omitted, not realizing) is > necessary for this to work. The docs[0] mention this, but I'd managed > to repeatedly miss it: > > > If the pattern ends with /, * will be automatically added. For > > example, the pattern foo/ becomes foo/*. In other words, it matches > > "foo" and everything inside, recursively. > > [0]: https://git-scm.com/docs/git-config#Documentation/git-config... :doh: --- sam/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sam/configuration.nix b/sam/configuration.nix index 7e870a6..7bac6a2 100644 --- a/sam/configuration.nix +++ b/sam/configuration.nix @@ -172,7 +172,7 @@ contents.core.sshCommand = "ssh -i ~/.ssh/github-vue"; } { - condition = "gitdir:/home/chandler/projects/machine-config"; + condition = "gitdir:/home/chandler/projects/machine-config/"; contents.core.sshCommand = "ssh -i ~/.ssh/machine-config-deploy-key"; } ];