summaryrefslogtreecommitdiff
path: root/tests/reset/soft.c
Commit message (Collapse)AuthorAgeFilesLines
* str: introduce `git_str` for internal, `git_buf` is externalethomson/gitstrEdward Thomson2021-10-171-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | libgit2 has two distinct requirements that were previously solved by `git_buf`. We require: 1. A general purpose string class that provides a number of utility APIs for manipulating data (eg, concatenating, truncating, etc). 2. A structure that we can use to return strings to callers that they can take ownership of. By using a single class (`git_buf`) for both of these purposes, we have confused the API to the point that refactorings are difficult and reasoning about correctness is also difficult. Move the utility class `git_buf` to be called `git_str`: this represents its general purpose, as an internal string buffer class. The name also is an homage to Junio Hamano ("gitstr"). The public API remains `git_buf`, and has a much smaller footprint. It is generally only used as an "out" param with strict requirements that follow the documentation. (Exceptions exist for some legacy APIs to avoid breaking callers unnecessarily.) Utility functions exist to convert a user-specified `git_buf` to a `git_str` so that we can call internal functions, then converting it back again.
* object_type: use new enumeration namesethomson/index_fixesEdward Thomson2018-12-011-1/+1
| | | | Use the new object_type enumeration names within the codebase.
* Convert usage of `git_buf_free` to new `git_buf_dispose`Patrick Steinhardt2018-06-101-2/+2
|
* Add tests for the annotated versions of ref-modifying functionsCarlos Martín Nieto2015-03-161-13/+20
| | | | | 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-2/+2
| | | | | | 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.
* reset: remove reflog message overrideCarlos Martín Nieto2015-03-031-11/+11
| | | | | This function is meant to simulate what git does in the reset command, so we should include the reflog message in that.
* Remove the signature from ref-modifying functionsCarlos Martín Nieto2015-03-031-13/+13
| | | | | | | | | | 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.
* Allow to propagate checkout callbacks to git HARD resetSven Strickroth2014-08-031-11/+11
| | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* Add reflog params to git_repository_detach_headBen Straub2014-02-041-2/+2
|
* Add reset tests for reflogBen Straub2014-02-031-0/+26
|
* Add reflog parameters to git_resetBen Straub2014-02-031-8/+8
|
* Reset helpers: use revparse insteadBen Straub2014-02-031-8/+7
|
* Rename tests-clar to testsBen Straub2013-11-141-0/+157