| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
Use the new object_type enumeration names within the codebase.
|
| |
|
|
|
|
|
|
|
|
|
| |
The commit message encoding is currently being parsed by the
`git__prefixcmp` function. As this function does not accept a buffer
length, it will happily skip over a buffer's end if it is not `NUL`
terminated.
Fix the issue by using `git__prefixncmp` instead. Add a test that
verifies that we are unable to parse the encoding field if it's cut off
by the supplied buffer length.
|
| |
|
|
|
|
| |
We currently do not have any test suites dedicated to parsing commits
from their raw representations. Add one based on `git_object__from_raw`
to be able to test special cases more easily.
|
| | |
|
| |
|
|
|
| |
The comment char is configurable and we need to provide a way for the
user to specify which comment char they chose for their message.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current version of the commit creation and amend function are unsafe
to use when passing the update_ref parameter, as they do not check that
the reference at the moment of update points to what the user expects.
Make sure that we're moving history forward when we ask the library to
update the reference for us by checking that the first parent of the new
commit is the current value of the reference. We also make sure that the
ref we're updating hasn't moved between the read and the write.
Similarly, when amending a commit, make sure that the current tip of the
branch is the commit we're amending.
|
| |
|
|
|
|
|
|
|
| |
This adds an API to amend an existing commit, basically a shorthand
for creating a new commit filling in missing parameters from the
values of an existing commit. As part of this, I also added a new
"sys" API to create a commit using a callback to get the parents.
This allowed me to rewrite all the other commit creation APIs so
that temporary allocations are no longer needed.
|
| |\
| |
| | |
Leftover OID -> ID changes
|
| | |
| |
| |
| | |
This was not converted when we converted the rest, so do it now.
|
| |/
|
|
|
| |
A lot of the tests were checking for overflow, which we don't have
anymore, so we can remove them.
|
| |
|