tests/reset


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.
Patrick Steinhardt e54343a4 2019-06-29T09:17:32 fileops: rename to "futils.h" to match function signatures Our file utils functions all have a "futils" prefix, e.g. `git_futils_touch`. One would thus naturally guess that their definitions and implementation would live in files "futils.h" and "futils.c", respectively, but in fact they live in "fileops.h". Rename the files to match expectations.
Edward Thomson 168fe39b 2018-11-28T14:26:57 object_type: use new enumeration names Use the new object_type enumeration names within the codebase.
Edward Thomson 18e71e6d 2018-11-28T13:31:06 index: use new enum and structure names Use the new-style index names throughout our own codebase.
Patrick Steinhardt ecf4f33a 2018-02-08T11:14:48 Convert usage of `git_buf_free` to new `git_buf_dispose`
Edward Thomson 9bc8c80f 2016-08-05T20:34:19 odb: actually insert the empty blob in tests
Carlos Martín Nieto 6d22ef7a 2016-04-11T11:37:02 reset: use real ids for the tests This lets us run with strict object creation on.
Edward Thomson ad8aa112 2016-02-11T11:26:42 reset test: fix initialization warning
Carlos Martín Nieto 465c3b38 2015-12-09T19:16:11 reset: perform the checkout before moving HEAD or the index This keeps the state of the workdir the same as one from HEAD, removing a source of possible confusion when calculating the work that is to be done.
Edward Thomson 2f1080ea 2015-05-19T11:17:07 conflict tests: use GIT_IDXENTRY_STAGE_SET
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.
Pierre-Olivier Latour b5ab878f 2015-03-08T14:09:50 Fixed build warning
Carlos Martín Nieto fe21d708 2015-03-04T00:29:37 Plug a few leaks
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>
Jiri Pospisil 7b8d564d 2014-04-25T15:49:58 Reset tests: Use sandboxed index
Russell Belfer bd101a7e 2014-04-21T11:54:54 Fix reset for staged deletes
Carlos Martín Nieto 4b7e1b9e 2014-01-15T13:19:48 refs: append to the HEAD reflog when updating the current branch 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.
Carlos Martín Nieto ae32c54e 2014-03-05T20:28:49 Plug a few leaks in the tests
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
Carlos Martín Nieto d541170c 2014-01-24T11:36:41 index: rename an entry's id to 'id' This was not converted when we converted the rest, so do it now.
Ben Straub 17820381 2013-11-14T14:05:52 Rename tests-clar to tests