src/merge_driver.c


Log

Author Commit Date CI Message
Patrick Steinhardt 0c7f49dd 2017-06-30T13:39:01 Make sure to always include "common.h" first Next to including several files, our "common.h" header also declares various macros which are then used throughout the project. As such, we have to make sure to always include this file first in all implementation files. Otherwise, we might encounter problems or even silent behavioural differences due to macros or defines not being defined as they should be. So in fact, our header and implementation files should make sure to always include "common.h" first. This commit does so by establishing a common include pattern. Header files inside of "src" will now always include "common.h" as its first other file, separated by a newline from all the other includes to make it stand out as special. There are two cases for the implementation files. If they do have a matching header file, they will always include this one first, leading to "common.h" being transitively included as first file. If they do not have a matching header file, they instead include "common.h" as first file themselves. This fixes the outlined problems and will become our standard practice for header and source files inside of the "src/" from now on.
Patrick Steinhardt bb342159 2017-03-15T11:46:15 merge_driver: fix const-correctness for source getters
Gumenik Alexandr 0608d5df 2017-03-06T12:30:31 merge_driver: add unresolved getters for git_merge_driver_source
Patrick Steinhardt 83c93a7c 2016-04-01T09:37:55 merge_driver: fix missing `goto done;` The code initializing the merge driver registry accidentally forgot a `goto done` in case of an error. Because of this the next line, which registers the global shutdown callback for the merge drivers, is only called when an error occured. Fix this by adding the missing `goto done`. This fixes some memory leaks when the global state is shut down.
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 967e073d 2016-02-27T16:42:02 merge driver: correct global initialization
Edward Thomson 7a3ab14f 2016-02-07T15:58:34 merge driver: get a pointer to favor
Edward Thomson 46625836 2016-02-07T15:19:43 merge driver: correct indentation
Edward Thomson 30a94ab7 2015-12-24T22:52:23 merge driver: allow custom default driver Allow merge users to configure a custom default merge driver via `git_merge_options`. Similarly, honor the `merge.default` configuration option.
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.