statusMatrix() throws if the git repo has submodules
See original GitHub issueusing 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:
- Created 5 years ago
- Comments:12 (10 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Indeed, they have been cloned through git cli