mirage / ocaml-git

Pure OCaml Git format and protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug with INDEX file

dinosaure opened this issue · comments

See #390

It seems that ocaml-git has some trouble with a specific INDEX file:

+1010173us git.index  [DEBUG] Reading 0 byte(s) of the file-descriptor
+1010190us git.index.decoder [DEBUG] We has 0 byte(s), we expect 1 byte(s) to hash, we expect 0 byte(s) to extension.

The version of Git used is:

# git --version
git version 2.25.4

(reportig by @talex5)

Note that this happened while running ocaml-git's unit tests. If you can detect when this has gone wrong (is 0 bytes a legal value here?) and crash, instead of writing GBs of data to the log endlessly, that would be better for the CI.

The CI is fine about git-index now so I can close this PR.