tests/merge/driver.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 ecf4f33a 2018-02-08T11:14:48 Convert usage of `git_buf_free` to new `git_buf_dispose`
Edward Thomson d953c450 2016-02-28T21:30:00 merge drivers: handle configured but not found driver
Edward Thomson 6d8b2cdb 2016-02-28T09:34:11 merge driver: remove `check` callback Since the `apply` callback can defer, the `check` callback is not necessary. Removing the `check` callback further makes the `payload` unnecessary along with the `cleanup` callback.
Edward Thomson 58d33126 2015-12-26T19:47:17 merge driver: tests for set and unset merge attribute Ensure that setting the merge attribute forces the built-in default `text` driver and does *not* honor the `merge.default` configuration option. Further ensure that unsetting the merge attribute forces a conflict (the `binary` driver).
Edward Thomson d3f0875a 2015-12-25T00:34:39 merge driver: tests for custom default merge drivers
Edward Thomson 7d307c1e 2015-12-23T23:52:02 merge driver: test GIT_EMERGECONFLICT When a `check` or `apply` callback function returns `GIT_EMERGECONFLICT` stop and product a conflict.
Edward Thomson 59f29314 2015-12-23T23:44:58 merge driver: test GIT_PASSTHROUGH When a `check` or `apply` callback function returns `GIT_PASSTHROUGH`, move on to the default merge driver.
Edward Thomson 3f04219f 2015-12-23T10:23:08 merge driver: introduce custom merge drivers Consumers can now register custom merged drivers with `git_merge_driver_register`. This allows consumers to support the merge drivers, as configured in `.gitattributes`. Consumers will be asked to perform the file-level merge when a custom driver is configured.