summaryrefslogtreecommitdiff
path: root/tests/revert
Commit message (Collapse)AuthorAgeFilesLines
* path: separate git-specific path functions from utilEdward Thomson2021-11-091-5/+5
| | | | | | Introduce `git_fs_path`, which operates on generic filesystem paths. `git_path` will be kept for only git-specific path functionality (for example, checking for `.git` in a path).
* str: introduce `git_str` for internal, `git_buf` is externalethomson/gitstrEdward Thomson2021-10-172-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add test for revert+rename bug.Colin Stolley2021-09-151-0/+49
|
* fileops: rename to "futils.h" to match function signaturesPatrick Steinhardt2019-07-202-2/+2
| | | | | | | | | 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.
* object_type: use new enumeration namesethomson/index_fixesEdward Thomson2018-12-012-5/+5
| | | | Use the new object_type enumeration names within the codebase.
* treewide: remove use of C++ style commentsPatrick Steinhardt2018-07-132-2/+2
| | | | | | | | | C++ style comment ("//") are not specified by the ISO C90 standard and thus do not conform to it. While libgit2 aims to conform to C90, we did not enforce it until now, which is why quite a lot of these non-conforming comments have snuck into our codebase. Do a tree-wide conversion of all C++ style comments to the supported C style comments to allow us enforcing strict C90 compliance in a later commit.
* Convert usage of `git_buf_free` to new `git_buf_dispose`Patrick Steinhardt2018-06-101-3/+3
|
* merge: rename `git_merge_tree_flags_t` -> `git_merge_flags_t`Edward Thomson2015-11-251-2/+2
|
* revert: correct test that added trailing newlineEdward Thomson2015-07-071-10/+12
|
* Renamed git_merge_options 'flags' to 'tree_flags'Jacques Germishuys2015-03-161-2/+2
|
* reset: remove reflog message overrideCarlos Martín Nieto2015-03-031-14/+14
| | | | | 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-14/+14
| | | | | | | | | | 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.
* revert tests: always use core.autocrlf=false in testsEdward Thomson2014-10-271-8/+6
|
* Allow to propagate checkout callbacks to git HARD resetSven Strickroth2014-08-031-14/+14
| | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* Capture conflict information in MERGE_MSG for revert and mergeJacques Germishuys2014-04-141-1/+13
|
* Update git_merge_tree_opts to git_merge_optionsEdward Thomson2014-03-201-4/+4
|
* git_revert_opts -> git_revert_optionsoptions-namesBen Straub2014-03-061-6/+6
|
* More merge.conflictstyle fixesBen Straub2014-02-051-0/+7
|
* Add reflog parameters to git_resetBen Straub2014-02-031-14/+14
|
* Remove the "merge none" flagEdward Thomson2014-01-201-6/+3
| | | | | | | The "merge none" (don't automerge) flag was only to aide in merge trivial tests. We can easily determine whether merge trivial resulted in a trivial merge or an automerge by examining the REUC after automerge has completed.
* merge_file should use more aggressive levelsEdward Thomson2014-01-201-1/+198
| | | | | | | | | | | The default merge_file level was XDL_MERGE_MINIMAL, which will produce conflicts where there should not be in the case where both sides were changed identically. Change the defaults to be more aggressive (XDL_MERGE_ZEALOUS) which will more aggressively compress non-conflicts. This matches git.git's defaults. Increase testing around reverting a previously reverted commit to illustrate this problem.
* Reorder var decls in revert testEdward Thomson2013-12-031-13/+13
| | | | Oh, MSVC.
* Bare naked merge and rebaseEdward Thomson2013-12-032-13/+120
|
* Introduce git_revert to revert a single commitEdward Thomson2013-12-021-0/+364