{"thread":{"id":"61694","subject":"git init fails because of includeIf configuration","startedAt":"2024-06-28T15:29:05Z","lastAt":"2024-06-28T19:40:18Z","messageCount":2,"participants":["Mushegh Khachatryan","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"497813","messageId":"0b92381d-b21f-4d3a-8e68-ad9977a8b45d@gmail.com","threadId":"61694","inReplyTo":null,"subject":"git init fails because of includeIf configuration","fromName":"Mushegh Khachatryan","fromEmail":"mushegh.khachatryan20@gmail.com","sentAt":"2024-06-28T15:29:01Z","receivedAt":"2024-06-28T15:29:05Z","isPatch":false,"sender":{"key":"mushegh.khachatryan20@gmail.com","avatar":null},"body":"Thank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\nI have a section of configuration for specific branch in my ~/.gitconfig \nfile. It looks like this\n\n```\n[includeIf \"onbranch:other\"]\n         path=~/.gitconfig-other\n```\n\nIn ~/.gitconfig-other I have this (the values are changed)\n\n```\n[user]\n     email = myemail@email.com\n     name = My Name\n     signingkey = KEYID\n\n[commit]\n     gpgsign = true\n\n[credential]\n     username = username\n```\n\nI ran `git init` in empty directory.\n\nWhat did you expect to happen? (Expected behavior)\n\nInitialize repository with or without includeIf configuration section.\n\nWhat happened instead? (Actual behavior)\n\n```\n$ git init\nBUG: refs.c:2123: reference backend is unknown\nzsh: IOT instruction (core dumped)  git init\n```\n\nWhat's different between what you expected and what actually happened?\n\nI have expected to initialize a new repository but got an error message.\n\nAnything else you want to add:\n\nI ended up commenting includeIf section in my .gitconfig file, \ninitialize repository then uncomment that section and use git as usual.\nThe problem might be related only to `git init`.\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n[System Info]\ngit version:\ngit version 2.45.2\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 6.6.34-1-lts #1 SMP PREEMPT_DYNAMIC Sun, 16 Jun 2024 \n14:45:31 +0000 x86_64\ncompiler info: gnuc: 14.1\nlibc info: glibc: 2.39\n$SHELL (typically, interactive shell): /bin/zsh\n\n\n[Enabled Hooks]\nnot run from a git repository - no hooks to show\n\n"},{"id":"497827","messageId":"xmqqseww26w5.fsf@gitster.g","threadId":"61694","inReplyTo":"0b92381d-b21f-4d3a-8e68-ad9977a8b45d@gmail.com","subject":"Re: git init fails because of includeIf configuration","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-06-28T19:40:10Z","receivedAt":"2024-06-28T19:40:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mushegh Khachatryan <mushegh.khachatryan20@gmail.com> writes:\n\n> $ git init\n> BUG: refs.c:2123: reference backend is unknown\n> zsh: IOT instruction (core dumped)  git init\n\nThanks for a report.  \n\nIs this the same issue that was reported some time ago and corrected\nin 407997c1 (setup: fix bug with \"includeIf.onbranch\" when\ninitializing dir, 2024-05-22), I wonder.  \n\nYou can try 'git' built from a recent tip of 'master' [*] to see if\nit is the same issue.  Anything that is not older than 7b0defb3 (The\ntenth batch, 2024-06-03) should has the fix 407997c1 (setup: fix bug\nwith \"includeIf.onbranch\" when initializing dir, 2024-05-22).\n\n\n"}]}