cmarcusreid / git-status-cache

High performance cache for git repository status. Clients can retrieve information via named pipe.
MIT License
16 stars 4 forks source link

Support Git Sparse Checkout #27

Open DiogoRoloOS opened 3 years ago

DiogoRoloOS commented 3 years ago

Can the libgit2 be updated to v1.1.0? That way Git Sparse Checkout is supported.

At the moment, we get the following error:

2021-04-30 17:08:46.741749 GitStatusCache.exe (0x0000943c) 0x00009460 Error Git.GetGitStatus.FailedToOpenRepository Failed to open repository. { "repositoryPath": "xxxxxxx/.git/", "result": "Generic Error", "lastError": "unsupported repository version 1. Only versions up to 0 are supported." }

hcoona commented 2 years ago

I made a progress on it. I build GitStatusCache.exe with libgit2 v1.4.2, see https://github.com/hcoona/git-status-cache/pull/1.

Unfortunately, libgit2 currently (September 2, 2022) still not fully support sparse checkout feature. It lack support to Git extensions.worktreeconfig. There is an ongoing MR for that, see https://github.com/libgit2/libgit2/issues/6044 & https://github.com/libgit2/libgit2/pull/6202.

I see these from log:

2022-09-02 13:47:46.124684  GitStatusCache.exe (0x000103a8) 0x0000b528  Error   Git.GetGitStatus.FailedToOpenRepository Failed to open repository. { "repositoryPath": "********************", "result": "Generic Error", "lastError": "unsupported extension name extensions.worktreeconfig" }
2022-09-02 13:47:46.124684  GitStatusCache.exe (0x000103a8) 0x0000b528  Warning StatusController.FailedRequest  Failed to service request. { "error": "Failed to retrieve status of git repository at provided 'Path'.", "request": "{"Version":1,"Path":"********************","Action":"GetStatus"}" }
2022-09-02 13:47:46.124684  GitStatusCache.exe (0x000103a8) 0x0000b528  Spam    NamedPipeInstance.OnClientRequest.Response  Sending response to client. { "response": "{"Version":1,"Error":"Failed to retrieve status of git repository at provided 'Path'."}" }