revparse_single does not understand date
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 408
- Avg merge
- 2d 57m
- Merged PRs (30d)
- 7
Description
Hi,
revparse_single does not support date parsing:
$ git rev-parse 'HEAD@{2 weeks ago}'
eebac5f1c21ec78e098a8f7b60facd726b30844e
$ python3 -c 'import pygit2; pygit2.Repository(".").revparse_single("HEAD@{2 weeks ago}")'
Traceback (most recent call last):
File "", line 1, in
KeyError: 'HEAD@{2 weeks ago}'
I am using version 0.26.0
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 reproducing the issue with git rev-parse and pygit2.Repository.revparse_single using HEAD@{2 weeks ago}. Trace how revparse_single handles the supplied revision and compare its behavior with Git. Done means date-based revision syntax resolves successfully instead of raising KeyError, with coverage for the reported example.
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