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

Minor bug, git ls-files -o aborts because of broken submodules

From
Duy Nguyen <pclouds@gmail.com>
Date
Jan 22, 2016, 09:17 UTC
Message-ID
<CACsJy8BpCc6sNKUs3TsMnA_8dk+uFvZy1T_UmfQMxcm2bpg2uw@mail.gmail.com>

$ git init abc $ cd abc $ mkdir def $ echo 'gitdir: blah blah' >def/.git $ git ls-files -o fatal: Not a git repository: def/blah blah

If some directory looks like a submodule but turns out not, that's not a fatal error. The stack trace is something like this. I suspect do_submodule_path should use the gently version..

#1 0x0000000000588a78 in die #2 0x0000000000558ded in read_gitfile_gently #3 0x000000000051e2f6 in do_submodule_path #4 0x000000000051e484 in git_pathdup_submodule #5 0x00000000005340ac in resolve_gitlink_ref_recursive #6 0x00000000005342cf in resolve_gitlink_ref #7 0x00000000004dd20d in treat_directory #8 0x00000000004dd760 in treat_one_path #9 0x00000000004dd971 in treat_path #10 0x00000000004de038 in read_directory_recursive

-- 
Duy
Next: Jeff King
Message 1 of 9 in “Minor bug, git ls-files -o aborts because of broken submodules”
  1. Duy NguyenJan 22, 2016
  2. Jeff KingJan 22, 2016
  3. Jeff KingJan 22, 2016
  4. 1/2 clean: make is_git_repository a public functionJeff King, Jan 22, 2016
  5. 2/2 resolve_gitlink_ref: ignore non-repository pathsJeff King, Jan 22, 2016
  6. Jeff KingJan 22, 2016
  7. Stefan BellerJan 22, 2016
  8. Jeff KingJan 22, 2016
  9. Andreas KreyJan 25, 2016

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.