libgit2 / libgit2/libgit2sharp
Implement hashing of files without adding it to the object db
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
Libgit2sharp does not seem to provide the equivalent functionality to git hash-object, even though libgit2 implements it. At first glance, it seems relatively simple to add, and I was planning on working on it and submitting a pull request. I was thinking that there would be a method on Repository that relies on
git_repository_hashfile and the usage would look like
using (var repo = new Repository("/repo"))
{
string sha;
sha = repo.HashFile("relative/path.txt");
sha = repo.HashFile("relative/path.txt", applyFilters: false);
sha = repo.HashFile("/repo/file.txt");
}
Any feedback is welcome.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Repository entry point and inspect the libgit2 git_repository_hashfile functionality described in the issue. Define the requested HashFile overloads, including the applyFilters option and repository-relative or absolute paths, while preserving the requirement not to add the file to the object database.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100