Finding alternate object directories on open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 408
- Avg merge
- 2d 57m
- Merged PRs (30d)
- 7
Description
Git 2.11 introduced a change such that incoming objects in a push are sequestered in an "alternate object directory." It appears that libgit2 supports opening repositories with these directories, taking certain environment variables into consideration, but the latest pygit2 does not invoke the appropriate function (git_repository_open_ext() from what I can tell). Am I correct in this assessment? Is there a way to work around this with the current code, or is a patch necessary?
If that didn't make sense, let me explain at a higher level: I'm writing a receive hook in Python and using pygit2 to examine the incoming commits. With versions of Git prior to 2.11 this is not a problem since the incoming objects are stored directly in the odb. However, now they are located elsewhere and pygit2 does not see them.
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 tracing how pygit2 opens repositories and compare that path with libgit2's git_repository_open_ext(), including the environment variables described in the issue. Verify the receive-hook case where incoming objects live in an alternate object directory; done means pygit2 can inspect those commits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100