summaryrefslogtreecommitdiff
path: root/tests/repo/head.c
Commit message (Collapse)AuthorAgeFilesLines
* Add tests for the annotated versions of ref-modifying functionsCarlos Martín Nieto2015-03-161-0/+8
| | | | | This also brings the soft-reset tests back to life. The function name was missing an underscore, meaning they had not been running.
* repository: remove log message override for switching the active branchCarlos Martín Nieto2015-03-031-46/+32
| | | | | | We want to use the "checkout: moving from ..." message in order to let git know when a change of branch has happened. Make the convenience functions for this goal write this message.
* Remove the signature from ref-modifying functionsCarlos Martín Nieto2015-03-031-34/+32
| | | | | | | | | | 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.
* Introduce cl_assert_equal_oidEdward Thomson2014-07-011-2/+2
|
* reflog: handle symref chainsCarlos Martín Nieto2014-03-191-0/+51
| | | | | Given HEAD -> master -> foo, when updating foo's reflog we should also update HEAD's, as it's considered the current branch.
* reflog: handle the birth of a branchCarlos Martín Nieto2014-03-191-0/+48
| | | | | | The reflog append function was overzealous in its checking. When passed an old and new ids, it should not do any checking, but just serialize the data to a reflog entry.
* refdb: don't update when there's no needCarlos Martín Nieto2014-03-191-0/+27
| | | | | If the caller wants to update a ref to point to the same target as it currently has, we should return early and avoid writing to the reflog.
* reflog: more comprehensive HEAD testsCarlos Martín Nieto2014-03-181-0/+72
| | | | | | | | | The existing ones lack checking zeroed ids when switching back from an unborn branch as well as what happens when detaching. The reflog appending function mistakenly wrote zeros when dealing with a detached HEAD. This explicitly checks for those situations and fixes them.
* refs: append to the HEAD reflog when updating the current branchCarlos Martín Nieto2014-03-171-2/+1
| | | | | | | | When we update the current branch, we must also append to HEAD's reflog to keep them in sync. This is a bit of a hack, but as git.git says, it covers 100% of default cases.
* repo: remove test which deletes HEADCarlos Martín Nieto2014-03-171-21/+0
| | | | | | This is not something anybody would ever do; removing HEAD makes the .git/ directory no longer be a repository, so we wouldn't be expected to handle such a situation.
* Add reflog params to git_repository_detach_headBen Straub2014-02-041-7/+28
|
* Fix warningBen Straub2014-02-031-1/+1
|
* Add failing test caseBen Straub2014-02-011-13/+38
|
* Enhance testing of signature parametersBen Straub2014-01-301-3/+10
|
* Ensure creating HEAD creates its reflogBen Straub2014-01-301-0/+21
|
* Ensure updating HEAD updates reflogBen Straub2014-01-301-0/+23
|
* Add reflog params to set-head callsBen Straub2014-01-301-8/+8
|
* refs: remove the _with_log differentiationCarlos Martín Nieto2014-01-151-3/+3
| | | | | | 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.
* Rename tests-clar to testsBen Straub2013-11-141-0/+196