2 Replies Latest reply on Feb 6, 2018 9:13 PM by alank99101739

    libgit2 error after laptop crash - any way to recover?

    alank99101739 Level 4

      My laptop crashed (blue screen of death!) and after restarting I got the infamous "libgit2 error" on the project.  I have a backup from a day ago, but I put a fair bit of effort into it since then, so thought I would see if any way to repair it before losing that work.

       

       

      Another thread mentioned creating the "objects" directory, but its already there.

       

       

      Anything else I can try before restoring from backup?

       

      Is the "repo.noindex" directory a git repository (like the .git directory using by git command lines). Does that mean I can use command line git tools to try and repair the directory?

        • 1. Re: libgit2 error after laptop crash - any way to recover?
          alank99101739 Level 4

          Well, interesting.... so it is a git repo.... I am going to do a bit of Google hunting on git repos to see if there is a way to recover it.  Looks like it lost the "refs/heads/master" file when it crashed. (Most people say throw away your .git directory and start again...)

           

          $ git --git-dir=repo.noindex fsck --full
          error: Invalid HEAD
          Checking object directories: 100% (256/256), done.
          error: refs/heads/master: invalid sha1 pointer 0000000000000000000000000000000000000000
          error: refs/heads/v107_1.1.1: invalid sha1 pointer 0000000000000000000000000000000000000000
          notice: No default references
          • 2. Re: libgit2 error after laptop crash - any way to recover?
            alank99101739 Level 4

            Everything I read sounded dire, so I restored from backup. After I restored from backup, "git --git-dir=repo.noindex fsck" still reported it as corrupt, so maybe its not a standard git repo somehow or other. Maybe standard git does not use SQL Lite for the repo files...