Using node:
const fs = require("fs")
const git = require("isomorphic-git")
git.log({ fs, dir: "/my-project", depth: 1, ref: "<sha>" }).then(res => console.log(res))
errors with:
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'slice' of null
at GitPackIndex.readSlice (/my-project/node_modules/isomorphic-git/index.cjs:2666:35)
This appears to be coming from: https://github.com/isomorphic-git/isomorphic-git/blob/main/src/models/GitPackIndex.js#L297
I was not on the latest, but I tried upgrading and it's still happening.
What is strange is that its pretty intermittent - its only happening in my ci, and I can't seem to repro locally. Any idea what might be causing this? Perhaps some issue with the git repo? I tried a git fsck already but it didn't show up any issues.
Using node:
errors with:
This appears to be coming from: https://github.com/isomorphic-git/isomorphic-git/blob/main/src/models/GitPackIndex.js#L297
I was not on the latest, but I tried upgrading and it's still happening.
What is strange is that its pretty intermittent - its only happening in my ci, and I can't seem to repro locally. Any idea what might be causing this? Perhaps some issue with the git repo? I tried a
git fsckalready but it didn't show up any issues.