Due to current submodule libgit2 which doesn't support index version 4 and may crash because of tree_iterator implementation issue, git-utils may crash when opening such git repository.
A minimum fix is, at least, merge libgit2/libgit2@4fea9cf commit.
A real fix is ask libgit2 to support index version 4 (See https://github.com/libgit2/libgit2/blob/master/src/index.c#L2343-L2345)
Repro steps:
- Create a git repository and commit a file.
- Run
git update-index --index-version=4 to update index version to 4.
- Run
git.open("path-to-git") on node
Expected behavior:
Open git repository
Actual behavior:
Crash
Due to current submodule
libgit2which doesn't support index version 4 and may crash because oftree_iteratorimplementation issue,git-utilsmay crash when opening such git repository.A minimum fix is, at least, merge libgit2/libgit2@4fea9cf commit.
A real fix is ask
libgit2to support index version 4 (See https://github.com/libgit2/libgit2/blob/master/src/index.c#L2343-L2345)Repro steps:
git update-index --index-version=4to update index version to 4.git.open("path-to-git")onnodeExpected behavior:
Open git repository
Actual behavior:
Crash