summaryrefslogtreecommitdiff
path: root/tests/repo/head.c
Commit message (Collapse)AuthorAgeFilesLines
* 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