question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

statusMatrix() throws if the git repo has submodules

See original GitHub issue

using Node

If a git repo has submodules git.statusMatrix({ dir: repoPath }) throws the following error:

Failed to read git object with oid 3b8453421de546970226ffb7ab0ecf2c8228c2b9

Note that the hash is the hash of the (first) submodule:

git submodule
 3b8453421de546970226ffb7ab0ecf2c8228c2b9 isomorphic-git (v0.0.26-467-g3b84534)

Seems like isomorphic-git tries to read an object from this repo’s object store but using the submodule’s hash as key.

I traced the problem down to statusMatrix() -> walkBeta1() -> GitWalkerRepo.readdir() -> readObject() but then got lost 😕

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
wmhiltoncommented, Jun 18, 2019

Aaaaahhhh… @BastienAr your submodules are full of files? You must have cloned them with another git implementation 😃. And those files all show up as new… urgh that’s got to be annoying. I’ll… see what I can do.

0reactions
b4nstcommented, Jun 20, 2019

Indeed, they have been cloned through git cli

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git - Submodules - Git SCM
We'll walk through developing a simple project that has been split up into a main project and a few sub-projects. Let's start by...
Read more >
How to know if a Git repository has submodules before it is ...
If .gitmodules exists on master of the repository, the command prints its content. We can check if submodules are listed in it. A...
Read more >
Git Submodules basic explanation - gists · GitHub
If there are changes in the submodule's repository, then git status in the main repository, will show Changes not staged for commit and...
Read more >
How to manage Git Submodules with JGit - Code Affine
The Git built-in answer to this problem is submodules. They allow putting a clone of another repository as a subdirectory within a parent ......
Read more >
How to Utilize Submodules within Git Repos - Bits and Pieces
Making any changes to the submodule in your main project will throw it out of sync with its source, which is a Git...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found