mikerochip / unity-git-tools

Improve your Unity project's Git integration, mostly for LFS locks
MIT License
3 stars 0 forks source link

need fix LoadLfsConfig #9

Closed kane9527-e closed 1 year ago

kane9527-e commented 1 year ago
image

private void LoadLfsConfig() { _hasLfsConfig = false;

        if (!IsGitRepo)
            return;

        var configPath = Path.Combine(_repoRootPath, ".git", "config");
        if (!File.Exists(configPath))
            throw new Exception($"[Git] Failed to load Git config \"{configPath}\"");

        var text = File.ReadAllText(configPath);
        _hasLfsConfig = text.Contains("[lfs]");//change ->  _hasLfsConfig = text.Contains("[lfs")
    }
mikerochip commented 1 year ago

hi @kane9527-e, I can fix this, but could you tell me what git-lfs version you're using? This looks like an older format.

My version is like this

mike@mikes-mbp14 ~ % git-lfs version
git-lfs/3.3.0 (GitHub; darwin arm64; go 1.19.3)
kane9527-e commented 1 year ago

TortoiseGit 2.14.0.0 (Hotfix 2.14.0.1; C:\Program Files\TortoiseGit\bin) git version 2.34.1.windows.1 (C:\Program Files\Git\bin; C:\Program Files\Git\mingw64\; C:\Program Files\Git\etc\gitconfig)> image