{"thread":{"id":"64520","subject":"git submodule of reference with no branch","startedAt":"2025-11-22T02:14:00Z","lastAt":"2025-11-27T12:41:08Z","messageCount":2,"participants":["Alon Bar-Lev"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"531159","messageId":"CAOazyz31vWPgGAFv2AHGzXO3MBGnz-EVW_ndPNgERBvRdAFS6A@mail.gmail.com","threadId":"64520","inReplyTo":null,"subject":"git submodule of reference with no branch","fromName":"Alon Bar-Lev","fromEmail":"alon.barlev@gmail.com","sentAt":"2025-11-22T02:13:41Z","receivedAt":"2025-11-22T02:14:00Z","isPatch":false,"sender":{"key":"alon.barlev@gmail.com","avatar":"https://gravatar.com/avatar/622377544f34b20b5709c97512490a702224fa29bd4f8f3de1fcb1c7932dc73a?d=mp&s=160"},"body":"Hello,\n\nI use Gerrit as a code review platform, there are some events in which\nI would like to review a feature that touches two repositories, one is\na submodule of the other.\n\nThe git module reference is set correctly, but since the change is\nunder refs/changes/xxx and not under refs/heads/xxx, git cannot find\nthis reference when trying to check out the repository.\n\nI could not find any option to either have an explicit reference\nwithout a branch or somehow to tweak the configuration to search under\nrefs/changes instead of refs/heads.\n\nI understand the branch concept makes sense when updating as usually\nwe are following a repository branch stream, however, I do not\nunderstand what purpose does the branch serve during checkout. The\ncheckout should be possible based on the reference regardless of the\nbranch.\n\nDoes anyone have an idea if it is possible to have a submodule with a\nreference only or tweak git to search a different hierarchy of refs?\n\nThanks,\nAlon\n"},{"id":"531373","messageId":"CAOazyz3f9Ggx88akX8G5LJYzJZxCCp8VZgCPtoM0YCJ8p_UzFg@mail.gmail.com","threadId":"64520","inReplyTo":"CAOazyz31vWPgGAFv2AHGzXO3MBGnz-EVW_ndPNgERBvRdAFS6A@mail.gmail.com","subject":"Re: git submodule of reference with no branch","fromName":"Alon Bar-Lev","fromEmail":"alon.barlev@gmail.com","sentAt":"2025-11-27T12:40:49Z","receivedAt":"2025-11-27T12:41:08Z","isPatch":false,"sender":{"key":"alon.barlev@gmail.com","avatar":"https://gravatar.com/avatar/622377544f34b20b5709c97512490a702224fa29bd4f8f3de1fcb1c7932dc73a?d=mp&s=160"},"body":"Hello,\n\nDoes anyone have an idea how to handle a submodule reference without a branch?\nIf this is not supported, will you accept a patch?\n\nThanks,\nAlon\n\nOn Sat, 22 Nov 2025 at 04:13, Alon Bar-Lev <alon.barlev@gmail.com> wrote:\n>\n> Hello,\n>\n> I use Gerrit as a code review platform, there are some events in which\n> I would like to review a feature that touches two repositories, one is\n> a submodule of the other.\n>\n> The git module reference is set correctly, but since the change is\n> under refs/changes/xxx and not under refs/heads/xxx, git cannot find\n> this reference when trying to check out the repository.\n>\n> I could not find any option to either have an explicit reference\n> without a branch or somehow to tweak the configuration to search under\n> refs/changes instead of refs/heads.\n>\n> I understand the branch concept makes sense when updating as usually\n> we are following a repository branch stream, however, I do not\n> understand what purpose does the branch serve during checkout. The\n> checkout should be possible based on the reference regardless of the\n> branch.\n>\n> Does anyone have an idea if it is possible to have a submodule with a\n> reference only or tweak git to search a different hierarchy of refs?\n>\n> Thanks,\n> Alon\n"}]}