Closed jlewi closed 3 days ago
ls -la
ls -la
total 0
drwxr-xr-x 10 jlewi wheel 320 Apr 17 04:23 .
drwxr-xr-x 3 jlewi wheel 96 Apr 12 17:10 ..
drwxr-xr-x 4 jlewi wheel 128 Apr 17 04:23 .git
drwxr-xr-x 3 jlewi wheel 96 Apr 12 17:10 .github
drwxr-xr-x 4 jlewi wheel 128 Apr 17 04:23 app
drwxr-xr-x 7 jlewi wheel 224 Apr 17 04:23 docs
drwxr-xr-x 4 jlewi wheel 128 Apr 17 04:23 frontend
drwxr-xr-x 3 jlewi wheel 96 Apr 17 04:23 iac
drwxr-xr-x 2 jlewi wheel 64 Apr 17 04:23 images
drwxr-xr-x 4 jlewi wheel 128 Apr 17 04:23 protos
So we see that directory
The git CLI also consisders it to be corrupt
git branch
fatal: not a git repository (or any of the parent directories): .git
So somehow the directory got corrupted.
At the very least we could try to recover by having hydros delete that directory but It would be good to understand why its getting corrupted.
Here's the contents of a valid .git
directory
-rw-r--r-- 1 jlewi staff 1128 Sep 2 15:17 COMMIT_EDITMSG
-rw-r--r-- 1 jlewi staff 595 Sep 2 14:51 FETCH_HEAD
-rw-r--r-- 1 jlewi staff 27 Sep 2 14:52 HEAD
-rw-r--r-- 1 jlewi staff 41 Aug 30 09:42 ORIG_HEAD
-rw-r--r-- 1 jlewi staff 4665 Sep 2 14:59 config
-rw-r--r-- 1 jlewi staff 73 Apr 9 16:41 description
drwxr-xr-x 15 jlewi staff 480 Apr 9 16:41 hooks
-rw-r--r-- 1 jlewi staff 39612 Sep 2 15:37 index
drwxr-xr-x 3 jlewi staff 96 Apr 9 16:41 info
drwxr-xr-x 4 jlewi staff 128 Apr 9 16:41 logs
drwxr-xr-x 260 jlewi staff 8320 Sep 2 15:17 objects
-rw-r--r-- 1 jlewi staff 233 Apr 9 16:41 packed-refs
drwxr-xr-x 6 jlewi staff 192 Aug 25 17:24 refs
So lots of files and objects are missing
My hypothesis is that those files might be automatically GC'd because they are in the temporary directory.
It looks like the GoGit error occurs because when you try to open the repository it tries to read the file ${REPO}/.git/HEAD
which doesn't exist in this case.
Rerunning a build the directory is already checked out but it can't be opened.