summaryrefslogtreecommitdiff
path: root/tests/commit/parse.c
Commit message (Collapse)AuthorAgeFilesLines
* commit: expose the different kinds of errorsCarlos Martín Nieto2016-02-161-0/+11
| | | | | | 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.
* commit: don't forget the last header fieldCarlos Martín Nieto2016-02-111-0/+7
| | | | | | | | | 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.
* Merge pull request #3599 from libgit2/gpgsignVicent Marti2016-02-091-0/+49
|\ | | | | Introduce git_commit_extract_signature
| * Introduce git_commit_extract_signaturegpgsignCarlos Martín Nieto2016-02-091-0/+49
| | | | | | | | | | | | This returns the GPG signature for a commit and its contents without the signature block, allowing for the verification of the commit's signature.
* | commit: also match the first header field when searchingcmn/header-field-2Carlos Martín Nieto2016-02-091-0/+4
|/ | | | | | | | 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.
* commit: allow retrieving an arbitrary header fieldcmn/commit-header-fieldCarlos Martín Nieto2015-06-221-0/+38
| | | | | | 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.
* commit: ignore multiple author fieldscmn/double-authorCarlos Martín Nieto2015-06-111-0/+7
| | | | | | | | | | 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.
* Rename tests-clar to testsBen Straub2013-11-141-0/+413