summaryrefslogtreecommitdiff
path: root/tests/object/commit
Commit message (Collapse)AuthorAgeFilesLines
* message: don't assume the comment charcmn/comment-charCarlos Martín Nieto2014-05-181-1/+1
| | | | | 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.
* commit: safer commit creation with reference updatecmn/commit-create-safeCarlos Martín Nieto2014-04-301-0/+9
| | | | | | | | | | | | | | 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.
* Add git_commit_amend APIRussell Belfer2014-02-071-0/+76
| | | | | | | | | 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.
* Merge pull request #2075 from libgit2/cmn/leftover-oidVicent Marti2014-01-271-1/+1
|\ | | | | Leftover OID -> ID changes
| * index: rename an entry's id to 'id'Carlos Martín Nieto2014-01-251-1/+1
| | | | | | | | This was not converted when we converted the rest, so do it now.
* | messsage: use git_buf in prettify()Carlos Martín Nieto2014-01-271-3/+5
|/ | | | | A lot of the tests were checking for overflow, which we don't have anymore, so we can remove them.
* Rename tests-clar to testsBen Straub2013-11-141-0/+132