git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: IRC discussion re: submodules & missing refs/heads/master

From
KFKent Fredric <kentfredric@gmail.com>
Date
Apr 18, 2012, 21:22 UTC
Message-ID
<CAATnKFCoE6XXTB48Mvq-ay-j-1gyxxPBUvLM+REFWHLCsrTsVQ@mail.gmail.com>
In-Reply-To
<20120418211426.GA6920@book.hvoigt.net>
On 19 April 2012 09:14, Heiko Voigt <hvoigt@hvoigt.net> wrote:
> From the subject I deduce that you have a some problem involving
> submodules. Could you please clearly summarise what you found and
> possibly provide a recipe (script snippet) how to reproduce the issue?
>

The transcript was provided for context, after the transcript are details of the problem and solution.

Summarised is as follows:

on 1.7.8.5 , running "git gc" while inside a submodule path removes refs/heads/master for that submodule in ~/.git/modules , and for some reason, sub-modules still require those files to work properly at 1.7.8.5 , ( which results in 'git status' bailing with 'oops' from the main repo )

Migrating to a newer git makes the problem vanish, as the newer git uses info/refs for both the main repo and the submodule, and the presence/absense of refs/heads/master is unimportant.

Solving it is reasonably straight forward on 1.7.8.5, manually extract the SHA1 from the modules info/refs file, and inject it back into the relevant file refs/heads/master , and things return to normal.

-- 
Kent

perl -e  "print substr( \"edrgmaM  SPA NOcomil.ic\\@tfrken\", \$_ * 3,
3 ) for ( 9,8,0,7,1,6,5,4,3,2 );"

http://kent-fredric.fox.geek.nz
Previous: Heiko Voigt
Message 3 of 3 in “IRC discussion re: submodules & missing refs/heads/master”
  1. Kent FredricApr 18, 2012
  2. Heiko VoigtApr 18, 2012
  3. Kent FredricApr 18, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.