File: Strange_symlinkPointsToGitDir_error.mdwn

package info (click to toggle)
git-annex 10.20250721-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 74,484 kB
  • sloc: haskell: 90,982; javascript: 9,103; sh: 1,469; makefile: 213; perl: 137; ansic: 44
file content (24 lines) | stat: -rw-r--r-- 1,853 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Today, I got the strange error below. I unlocked a file, and edited it, and attempted to sync, when I saw the error. 

```
remote: error: object a86b9c49d9ef8c88c3180013eef3da5f6ffa9353: symlinkPointsToGitDir: symlink target points to git dir
remote: error: object ebb743ffb44e23c54a7e3ed44a444cc0ed0df42d: symlinkPointsToGitDir: symlink target points to git dir
remote: fatal: fsck error in pack objects
error: remote unpack failed: unpack-objects abnormal exit
To gitlab.com:datamanager/tasks.git
 ! [remote rejected]     git-annex -> synced/git-annex (unpacker error)
 ! [remote rejected]     master -> synced/master (unpacker error)
error: failed to push some refs to 'gitlab.com:datamanager/tasks.git'
remote: error: object a86b9c49d9ef8c88c3180013eef3da5f6ffa9353: symlinkPointsToGitDir: symlink target points to git dir
remote: error: object ebb743ffb44e23c54a7e3ed44a444cc0ed0df42d: symlinkPointsToGitDir: symlink target points to git dir
remote: fatal: fsck error in pack objects
error: remote unpack failed: unpack-objects abnormal exit
To gitlab.com:datamanager/tasks.git
 ! [remote rejected]     master -> master (unpacker error)
```

It's strange because I've done this unlock, edit, and sync, flow a few times in the past week, with no problems. I've only been able to find one reference point for this, in [git's own documentation](https://git-scm.com/docs/git-fsck#Documentation/git-fsck.txt-codesymlinkPointsToGitDircode). 

It's very concerning because it prevents me from syncing with my remote repository at all. I was able to work around the problem with `git reset HEAD~` so I could at least get a few changes sent to my remote, but that meant I lost all the changes I made to the file itself. 

Can anyone say what the problem might be here? Why does git suddenly seem upset that I've got a symlink pointing at my git directory?