summaryrefslogtreecommitdiff
path: root/tests/commit
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Remove the signature from ref-modifying functionsCarlos Martín Nieto2015-03-031-1/+1
| | | | | | | | | | 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.
* signature: don't allow empty emailscmn/signature-empty-emailCarlos Martín Nieto2014-09-101-2/+2
| | | | | | 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.
* Introduce cl_assert_equal_oidEdward Thomson2014-07-012-2/+2
|
* commit: safer commit creation with reference updatecmn/commit-create-safeCarlos Martín Nieto2014-04-301-0/+4
| | | | | | | | | | | | | | 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.
* Fix reflog message when creating commitsBen Straub2014-02-041-1/+14
|
* Summarize empty messagesEdward Thomson2014-01-221-0/+4
|
* refs: remove the _with_log differentiationCarlos Martín Nieto2014-01-151-1/+1
| | | | | | 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.
* Introduce git_revert to revert a single commitEdward Thomson2013-12-021-0/+29
|
* Rename tests-clar to testsBen Straub2013-11-145-0/+747