tests/stash/apply.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.
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.
Patrick Steinhardt 0652abaa 2018-07-20T12:56:49 Merge pull request #4702 from tiennou/fix/coverity Assorted Coverity fixes
Patrick Steinhardt 9994cd3f 2018-06-25T11:56:52 treewide: remove use of C++ style comments 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.
Etienne Samson 8455a270 2018-07-01T12:04:27 tests: add missing cl_git_pass to tests Reported by Coverity, CID 1393678-1393697.
Patrick Steinhardt ecf4f33a 2018-02-08T11:14:48 Convert usage of `git_buf_free` to new `git_buf_dispose`
Edward Thomson 0175971e 2015-06-29T15:21:22 stash: const up conflict params
Edward Thomson ee6eed51 2015-06-25T19:04:04 stash: test we apply using reflog-like indices
Edward Thomson b7f5cb8d 2015-06-20T19:33:15 stash: stage new files when unstashing them Files that were new (staged additions) in the stash tree should be staged when unstashing, even when not applying the index.
Edward Thomson 82b1c93d 2015-06-20T13:44:22 stash: don't allow apply with staged changes
Edward Thomson 1db6a0ab 2015-06-19T17:29:59 stash apply: add a newly staged file to tests
Pierre-Olivier Latour 07ea3a7f 2015-06-20T10:57:03 Fixed index being double-freed in stash tests
Pierre-Olivier Latour 9f3c18e2 2015-06-02T08:36:15 Fixed build warnings on Xcode 6.1
Edward Thomson 885b94aa 2015-05-28T15:26:13 Rename GIT_EMERGECONFLICT to GIT_ECONFLICT We do not error on "merge conflicts"; on the contrary, merge conflicts are a normal part of merging. We only error on "checkout conflicts", where a change exists in the index or the working directory that would otherwise be overwritten by performing the checkout. This *may* happen during merge (after the production of the new index that we're going to checkout) but it could happen during any checkout.
Carlos Martín Nieto 3e529e9d 2015-05-13T16:12:45 Fix a few leaks The interesting one is the notification macro, which was returning directly on a soft-abort instead of going through the cleanup.
Edward Thomson 4ea3eebf 2015-05-01T18:34:38 stash_apply: provide progress callbacks
Edward Thomson 19c80a6f 2015-05-01T18:07:10 stash_apply: provide its own options structure
Edward Thomson 24961668 2015-04-20T20:06:02 stash: test checkout notify callbacks
Edward Thomson f78bb2af 2015-03-18T01:54:04 stash: return GIT_EMERGECONFLICT on merge conflict
Edward Thomson f0957589 2015-03-04T23:55:42 stash: refactor to use merge_iterators
Edward Thomson d0dd3fce 2015-02-18T15:16:05 stash apply: check out a tree, not piecewise
Pierre-Olivier Latour bf8dd3f5 2014-11-14T12:32:47 Added git_stash_apply() and git_stash_pop() APIs