|
0fbf62cd
|
2022-02-12T08:46:55
|
|
merge: make the internal flags public
We made the flags that enable recursive merge internal, on the
assumption that nobody would want them and they're hard to reason about.
(Giving people an option that nobody wants is just extra noise.)
However, it made it hard for _us_ to reason about. There's no good
reason to keep it private, let's just make it public and push that
cognitive load onto our poor users. But they should expect it, they're
dealing with git, after all.
|
|
caaa1fdf
|
2022-02-07T00:58:38
|
|
merge: change enum GIT_MERGE_FILE_FAVOR__CONFLICTED to flag
GIT_MERGE_FILE__CONFLICTED
This is to avoid a possible problem where the value is set to the
same as GIT_MERGE_FILE_SIMPLIFY_ALNUM in git_merge_file_flag_t
|
|
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.
|
|
61f33f3e
|
2020-04-05T17:08:42
|
|
merge_driver: use GIT_ASSERT
|
|
e316b0d3
|
2020-05-15T11:47:09
|
|
runtime: move init/shutdown into the "runtime"
Provide a mechanism for system components to register for initialization
and shutdown of the libgit2 runtime.
|
|
1bddbd02
|
2020-01-15T10:30:00
|
|
merge: Return non-const git_repository from git_merge_driver_source_repo accessor.
|
|
91a300b7
|
2019-06-16T00:46:30
|
|
attr: rename constants and macros for consistency
Our enumeration values are not generally suffixed with `T`. Further,
our enumeration names are generally more descriptive.
|
|
f673e232
|
2018-12-27T13:47:34
|
|
git_error: use new names in internal APIs and usage
Move to the `git_error` name in the internal API for error-related
functions.
|
|
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.
|
|
bb342159
|
2017-03-15T11:46:15
|
|
merge_driver: fix const-correctness for source getters
|
|
0608d5df
|
2017-03-06T12:30:31
|
|
merge_driver: add unresolved getters for git_merge_driver_source
|
|
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.
|
|
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.
|
|
967e073d
|
2016-02-27T16:42:02
|
|
merge driver: correct global initialization
|
|
7a3ab14f
|
2016-02-07T15:58:34
|
|
merge driver: get a pointer to favor
|
|
46625836
|
2016-02-07T15:19:43
|
|
merge driver: correct indentation
|
|
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.
|
|
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.
|