{"thread":{"id":"56078","subject":"[Question] worktree vs. gitdir in [includeIf]","startedAt":"2021-07-08T17:26:08Z","lastAt":"2021-07-12T22:22:34Z","messageCount":5,"participants":["Randall S. Becker","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"429501","messageId":"003701d7741e$550b6510$ff222f30$@nexbridge.com","threadId":"56078","inReplyTo":null,"subject":"[Question] worktree vs. gitdir in [includeIf]","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2021-07-08T17:25:59Z","receivedAt":"2021-07-08T17:26:08Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"Hi Git Team,\n\nI am wondering whether there is, or are plans for, something analogous to [includeIf \"worktree:path\"] with a similar semantic to\n[includeIf \"gitdir:path\"]. \n\nThanks,\nRandall\n\n-- Brief whoami:\nNonStop developer since approximately 211288444200000000\nUNIX developer since approximately 421664400\n-- In my real life, I talk too much.\n\n\n\n"},{"id":"429504","messageId":"xmqqk0m0brq1.fsf@gitster.g","threadId":"56078","inReplyTo":"003701d7741e$550b6510$ff222f30$@nexbridge.com","subject":"Re: [Question] worktree vs. gitdir in [includeIf]","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-08T18:11:50Z","receivedAt":"2021-07-08T18:11:53Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Randall S. Becker\" <rsbecker@nexbridge.com> writes:\n\n> I am wondering whether there is, or are plans for, something\n> analogous to [includeIf \"worktree:path\"] with a similar semantic\n> to [includeIf \"gitdir:path\"].\n\nI do not think there currently is an implementation, nor a plan, but\nI offhand do not see downsides in a feature to let you conditionally\nenable some configuration based on the location of the worktree.\n\nThanks.\n"},{"id":"429505","messageId":"003a01d77425$4fe94aa0$efbbdfe0$@nexbridge.com","threadId":"56078","inReplyTo":"xmqqk0m0brq1.fsf@gitster.g","subject":"RE: [Question] worktree vs. gitdir in [includeIf]","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2021-07-08T18:15:58Z","receivedAt":"2021-07-08T18:16:13Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On July 8, 2021 2:12 PM, Junio C Hamano wrote:\n>\"Randall S. Becker\" <rsbecker@nexbridge.com> writes:\n>\n>> I am wondering whether there is, or are plans for, something analogous\n>> to [includeIf \"worktree:path\"] with a similar semantic to [includeIf\n>> \"gitdir:path\"].\n>\n>I do not think there currently is an implementation, nor a plan, but I offhand do not see downsides in a feature to let you\nconditionally\n>enable some configuration based on the location of the worktree.\n\nThanks. I'll start digging into this.\n\n"},{"id":"429586","messageId":"009d01d77513$07b638d0$1722aa70$@nexbridge.com","threadId":"56078","inReplyTo":"xmqqk0m0brq1.fsf@gitster.g","subject":"RE: [Question] worktree vs. gitdir in [includeIf]","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2021-07-09T22:37:36Z","receivedAt":"2021-07-09T22:37:47Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On July 8, 2021 2:12 PM, Junio C Hamano wrote:\n>To: Randall S. Becker <rsbecker@nexbridge.com>\n>Cc: git@vger.kernel.org\n>Subject: Re: [Question] worktree vs. gitdir in [includeIf]\n>\n>\"Randall S. Becker\" <rsbecker@nexbridge.com> writes:\n>\n>> I am wondering whether there is, or are plans for, something analogous\n>> to [includeIf \"worktree:path\"] with a similar semantic to [includeIf\n>> \"gitdir:path\"].\n>\n>I do not think there currently is an implementation, nor a plan, but I offhand do not see downsides in a feature to let you\nconditionally\n>enable some configuration based on the location of the worktree.\n\nI'm scratching my head on this a bit. The [includeIf \"onbranch:foo\"] form is a bit confusing when dealing with a worktree. It looks\nlike the code either does not work if in a worktree or will get the branch of the main repo instead of the worktree ref. It looks\nlike include_by_branch() always returns 0 if in a worktree. Is there something being done in skip_prefix() or resolve_ref_unsafe()\nthat would deal with this?\n\nThanks,\nRandall\n\n"},{"id":"429843","messageId":"013601d7776c$65f901b0$31eb0510$@nexbridge.com","threadId":"56078","inReplyTo":"xmqqk0m0brq1.fsf@gitster.g","subject":"RE: [Question] worktree vs. gitdir in [includeIf]","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2021-07-12T22:22:22Z","receivedAt":"2021-07-12T22:22:34Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On July 8, 2021 2:12 PM,  Junio C Hamano wrote:\n>Subject: Re: [Question] worktree vs. gitdir in [includeIf]\n>\"Randall S. Becker\" <rsbecker@nexbridge.com> writes:\n>\n>> I am wondering whether there is, or are plans for, something analogous\n>> to [includeIf \"worktree:path\"] with a similar semantic to [includeIf\n>> \"gitdir:path\"].\n>\n>I do not think there currently is an implementation, nor a plan, but I offhand do not see downsides in a feature to let you\nconditionally\n>enable some configuration based on the location of the worktree.\n\nI have a patch set available, but am having some issues convincing the combination of git, OpenSSL, and my ISP to talk to each\nother. Specifically, I'm getting \"ssl3_get_record:wrong version number\", on every system I'm using. Probably an operator error. I\nmight have to manually post the patch files.\n\n"}]}