libgit2 / libgit2/libgit2

Support streaming read of a blob

Open
#5,695 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

up for grabs
Dominant language
C
Stars
10.6k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

Description

libgit2 currently supports git_blob_rawcontent which allows to read the raw contents of a blob into memory. But this loads the entire blob into memory at once. It would be nice to be able to "stream" the read of the blob so it can be read incrementally in smaller chunks, without allocating memory for the entire blob at once. In other words, a function that returns some read stream like object with a read method that reads the contents of the blob.

This of course is only effective if the blob won't be parsed entirely into memory at once being the scenes.

Version of libgit2 (release number or SHA1)

v1.1.0

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 by reading the git_blob_rawcontent API documentation and tracing how blob contents are currently loaded. Define an incremental read interface that avoids loading the entire blob into memory, then verify that the resulting behavior meets the streaming requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, git
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.