libgit2 / libgit2/libgit2sharp

Index in a Bare repository

Open
#1,491 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3.5k
Forks
925
PR merge metrics
No merged PRs in 30d

Description

So currently Index only exists when its not a bare repository. (https://github.com/libgit2/libgit2sharp/blob/master/LibGit2Sharp/Repository.cs#L284)

I'm wondering if its possible to have a Index backend. Just like how ObjectDatabase and Refs can have a backend. It looks like libgit2 supports an in memory Index get_index_new so I'm thinking it could work.

My thought is that I could load my Index data from somewhere else and put it into the in memory index? Does this sound crazy?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Repository.cs around line 284 and compare how ObjectDatabase and Refs expose backends. Read libgit2's get_index_new documentation to determine whether an in-memory Index can support bare repositories and externally loaded data. Done should be a clear design and implementation path for an Index backend, with tests covering the bare-repository case.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, git
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.