Skip to content

Use gix to implement MainGitFetcher - #106

Merged
Nilirad merged 9 commits into
mainfrom
gix
Jul 20, 2026
Merged

Use gix to implement MainGitFetcher#106
Nilirad merged 9 commits into
mainfrom
gix

Conversation

@Nilirad

@Nilirad Nilirad commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Uses gix::ThreadSafeRepository to fetch branch refs instead of shelling git ls-remote, saving on time and memory. MainGitFetcher has been updated to hold a gix handle of the local repository (i.e. ThreadSafeRepository) stored on a folder defined by CBRIDGE__GIT__REPO_PATH, and loaded on config.git.repo_path.

Unit tests have been removed from polling/git.rs because they were used to test the hash extraction from git ls-remote. An integration test has been added in its place.

Nilirad added 9 commits July 20, 2026 07:28
- Thread Leak Prevention: Configured gix Repository with timeout values.
  This ensures hanging network requests timeout natively within the
  blocking OS thread rather than permanently blocking the tokio worker
  pool.
- Fetch Optimization: Explicitly set fetch tags to None before
  connecting to remote repositories, preventing the wasteful download of
  all tags.
- Error Handling: Fixed swallowed repository initialization errors by
  explicitly matching against NotARepository before falling back to
  gix::init.
@Nilirad
Nilirad merged commit c4c10c9 into main Jul 20, 2026
4 checks passed
@Nilirad
Nilirad deleted the gix branch July 20, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use gix to fetch branch hash

1 participant