-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref.log() crashes on the reflog created by Repository.references.create() #901
Comments
Actually, I think the issue isn't with writing, but with reading a file containing a line with no log message. Line 66 in c43db44
|
Can you provide a complete example? I cannot reproduce it. |
This is what I'm getting: ref = repo.references['refs/heads/master']
list(ref.log()) # works
ref = repo.references.create('refs/heads/foo', ref.target)
list(ref.log()) # crashes |
Thanks! |
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this issue
Jun 11, 2019
0.28.2 (2019-05-26) ------------------------- - Fix crash in reflog iteration `#901 <https://github.com/libgit2/pygit2/issues/901>`_ - Support symbolic references in ``branches.with_commit(..)`` `#910 <https://github.com/libgit2/pygit2/issues/910>`_ - Documentation updates `#909 <https://github.com/libgit2/pygit2/pull/909>`_ - Test updates `#911 <https://github.com/libgit2/pygit2/pull/911>`_
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you create a new reference using Repository.references.create(), then an invalid (corrupt) reflog file gets created (e.g. can't be read by
ref.log()
).This looks to be because e.g.
Repository_create_reference_direct
passesNULL
togit_reference_create()
as thelog_message
argument:pygit2/src/repository.c
Line 1492 in c43db44
And similarly for
Repository_create_reference_symbolic
:pygit2/src/repository.c
Lines 1527 to 1528 in c43db44
The text was updated successfully, but these errors were encountered: