libgit2 / libgit2/libgit2sharp
How to get lines modified in a commit
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
My question is as stated in the title - I want to get the specific line numbers that were changed in a commit. I've been looking at Repository.Diff.Compare<Patch> but the info I need isn't there...
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 by inspecting Repository.Diff.Compare and the Patch data it returns, since the issue says the needed line information is absent there. Trace the diff API's existing documentation or examples to determine where changed line numbers are exposed. Done means identifying a supported way to retrieve the specific changed lines, or documenting that the API does not provide them.
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
- Needs clarification
- Newbie friendliness
- 28/100