tests/reset/soft.c


Log

Author Commit Date CI Message
Edward Thomson f0e693b1 2021-09-07T17:53:49 str: introduce `git_str` for internal, `git_buf` is external 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.
Edward Thomson 168fe39b 2018-11-28T14:26:57 object_type: use new enumeration names Use the new object_type enumeration names within the codebase.
Patrick Steinhardt ecf4f33a 2018-02-08T11:14:48 Convert usage of `git_buf_free` to new `git_buf_dispose`
Carlos Martín Nieto a5815a2a 2015-03-07T00:30:40 Add tests for the annotated versions of ref-modifying functions This also brings the soft-reset tests back to life. The function name was missing an underscore, meaning they had not been running.
Carlos Martín Nieto 4e498646 2015-01-15T16:50:31 repository: remove log message override for switching the active branch 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.
Carlos Martín Nieto 23a17803 2015-01-07T14:16:50 reset: remove reflog message override This function is meant to simulate what git does in the reset command, so we should include the reflog message in that.
Carlos Martín Nieto 659cf202 2015-01-07T12:23:05 Remove the signature from ref-modifying functions 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.
Sven Strickroth b8add6c4 2014-08-03T15:44:13 Allow to propagate checkout callbacks to git HARD reset Signed-off-by: Sven Strickroth <email@cs-ware.de>
Ben Straub 010cec3a 2014-02-04T20:50:40 Add reflog params to git_repository_detach_head
Ben Straub 86746b4b 2014-02-03T15:06:47 Add reset tests for reflog
Ben Straub 586be3b8 2014-02-03T15:05:55 Add reflog parameters to git_reset
Ben Straub 0d847a31 2014-02-03T14:08:40 Reset helpers: use revparse instead
Ben Straub 17820381 2013-11-14T14:05:52 Rename tests-clar to tests