Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-03-17Merge pull request #3673 from libgit2/cmn/commit-with-signatureEdward Thomson
commit: add function to attach a signature to a commit
2016-03-17commit: fix extraction of single-line signaturesCarlos Martín Nieto
The function to extract signatures suffers from a similar bug to the header field finding one by having an unecessary line feed check as a break condition of its loop. Fix that and add a test for this single-line signature situation.
2016-03-15commit: add function to attach a signature to a commitCarlos Martín Nieto
In combination with the function which creates a commit into a buffer, this allows us to more easily create signed commits.
2016-03-08commit: split creating the commit and writing it outCarlos Martín Nieto
Sometimes you want to create a commit but not write it out to the objectdb immediately. For these cases, provide a new function to retrieve the buffer instead of having to go through the db.
2016-02-29turn on strict object validation by defaultEdward Thomson
2016-02-28git_commit: validate tree and parent idsEdward Thomson
When `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION` is turned on, validate the tree and parent ids given to commit creation functions.
2016-02-16commit: expose the different kinds of errorsCarlos Martín Nieto
We should be checking whether the object we're looking up is a commit, and we should let the caller know whether the not-found return code comes from a bad object type or just a missing signature.
2016-02-12commit: don't forget the last header fieldCarlos Martín Nieto
When we moved the logic to handle the first one, wrong loop logic was kept in place which meant we still finished early. But we now notice it because we're not reading past the last LF we find. This was not noticed before as the last field in the tested commit was multi-line which does not trigger the early break.
2016-02-09Merge pull request #3599 from libgit2/gpgsignVicent Marti
Introduce git_commit_extract_signature
2016-02-09Introduce git_commit_extract_signatureCarlos Martín Nieto
This returns the GPG signature for a commit and its contents without the signature block, allowing for the verification of the commit's signature.
2016-02-09commit: also match the first header field when searchingCarlos Martín Nieto
We were searching only past the first header field, which meant we were unable to find e.g. `tree` which is the first field. While here, make sure to set an error message in case we cannot find the field.
2015-12-17commit: Fix memory leak in test suiteVicent Marti
2015-12-01commit: introduce `git_commit_body`Patrick Steinhardt
It is already possible to get a commit's summary with the `git_commit_summary` function. It is not possible to get the remaining part of the commit message, that is the commit message's body. Fix this by introducing a new function `git_commit_body`.
2015-11-04Fix git_commit_summary to convert newlines to spaces even afterStjepan Rajko
whitespace. Collapse spaces around newlines for the summary.
2015-10-21signature: Strip crud just like Git doesVicent Marti
2015-06-22commit: allow retrieving an arbitrary header fieldCarlos Martín Nieto
This allows the user to look up fields which we don't parse in libgit2, and allows them to access gpgsig or mergetag fields if they wish to check the signature.
2015-06-11commit: ignore multiple author fieldsCarlos Martín Nieto
Some tools create multiple author fields. git is rather lax when parsing them, although fsck does complain about them. This means that they exist in the wild. As it's not too taxing to check for them, and there shouldn't be a noticeable slowdown when dealing with correct commits, add logic to skip over these extra fields when parsing the commit.
2015-03-03Remove the signature from ref-modifying functionsCarlos Martín Nieto
The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
2014-09-10signature: don't allow empty emailsCarlos Martín Nieto
A signature is made up of a non-empty name and a non-empty email so let's validate that. This also brings us more in line with git, which also rejects ident with an empty email.
2014-07-01Introduce cl_assert_equal_oidEdward Thomson
2014-04-30commit: safer commit creation with reference updateCarlos Martín Nieto
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.
2014-02-05Fix reflog message when creating commitsBen Straub
2014-01-22Summarize empty messagesEdward Thomson
2014-01-15refs: remove the _with_log differentiationCarlos Martín Nieto
Any well-behaved program should write a descriptive message to the reflog whenever it updates a reference. Let's make this more prominent by removing the version without the reflog parameters.
2013-12-03Introduce git_revert to revert a single commitEdward Thomson
2013-11-15Rename tests-clar to testsBen Straub