how to diff one file in working dir against a Blob?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 408
- Avg merge
- 2d 57m
- Merged PRs (30d)
- 7
Description
pygit2 version python3-pygit2-0.23.3-2.fc23.x86_64
I cannot figure out how I can get a diff for only one file.
How do I arrange to have pygit2 return the diff of a Blob against the working dir file?
I looked at calling diff_to_working on a new Index(), but that fails because the new Index() does not
self._repo filled in.
TreeBuilder() seems is unable to help as it requires putting tree objects into the repo to allow
for the folder structure, for example to diff Source/file.py. needs a tree for Source. I clearly
do not want to be writting files into the repo to do a diff.
Did I miss something in API?
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 reviewing the diff_to_working and Index APIs mentioned in the issue, along with how pygit2 represents a Blob and working-directory file. Determine whether an existing API supports this comparison without creating repository tree objects; done means identifying or specifying a supported path for a single-file Blob-to-working-tree diff.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100