Apply Function on Repository Fails on blank lines
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 408
- Avg merge
- 2d 57m
- Merged PRs (30d)
- 7
Description
The apply Function of the Repository Class fails if a diff contains a blank line with the Error = "Error: _pygit2.GitError: hunk at line ... did not apply"
To make it more clear. The hunk
- this is a
- test
-
repo.apply(diff,pygit2.GIT_APPLY_LOCATION_INDEX)
has a blank last line that is removed. This hunk fails when applied.
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.apply entry point and reproduce the shown diff containing a blank final line with repo.apply(diff, pygit2.GIT_APPLY_LOCATION_INDEX). Done means this hunk applies successfully without the reported _pygit2.GitError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100