| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| | |
oidarray: introduce `git_oidarray_dispose`
|
| |
| |
| |
| |
| |
| | |
Since users are disposing the _contents_ of the oidarray, not freeing
the oidarray itself, the proper cleanup function is
`git_oidarray_dispose`. Deprecate `git_oidarray_free`.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
When `git_repository_hashfile` is handed an absolute path, it determines
whether the path is within the repository's working directory or not.
This is necessary when there is no `as_path` specified.
If the path is within the working directory, then the given path should
be used for attribute lookups (it is the effective `as_path`). If it is
not within the working directory, then it is _not_ eligible.
Importantly, now we will _never_ pass an absolute path down to attribute
lookup functions.
|
| |
|
|\
| |
| | |
diff: update `GIT_DIFF_IGNORE_BLANK_LINES`
|
| |
| |
| |
| |
| | |
`GIT_DIFF_IGNORE_BLANK_LINES` needs to be within a (signed) int, per the
`enum` definition of ISO C.
|
|/
|
|
|
|
|
| |
Using a `git_oid *` in filter options was a mistake; it is a deviation
from our typical pattern, and callers in some languages that GC may need
very special treatment in order to pass both an options structure and a
pointer outside of it.
|
|\
| |
| | |
Introduce `git_email_create`; deprecate `git_diff_format_email`
|
| |
| |
| |
| | |
`git_diff_format_email` is deprecated in favor of `git_email_create`.
|
| |
| |
| |
| |
| | |
`git format-patch` includes diffs with rename detection enabled by
default when creating emails. Match this behavior.
|
| |
| |
| |
| |
| | |
`git format-patch` includes binary diffs by default when creating
emails. Match this behavior.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introduce a function to create an email from a diff and multiple inputs
about the source of the diff.
Creating an email from a diff requires many more inputs, and should be
discouraged in favor of building directly from a commit, and is thus in
the `sys` namespace.
|
| |
| |
| |
| |
| |
| | |
Create `git_email_*` which will encapsulate email creation and
application, and `git_email_create_from_commit` in particular, which
creates an email for a single commit.
|
|\ \
| |/
|/|
| |
| | |
lolgear/refactoring/stdint_ifdef_condition_has_been_reverted
Stdint header condition has been reverted.
|
| | |
|
|\ \
| | |
| | | |
Support custom git extensions
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Allow users to specify additional repository extensions that they want
to support. For example, callers can specify that they support
`preciousObjects` and then may open repositories that support
`extensions.preciousObjects`.
Similarly, callers may opt out of supporting extensions that the library
itself supports.
|
| | |
| | |
| | |
| | | |
Make some syntax change to follow coding style.
|
|/ /
| |
| |
| |
| |
| |
| | |
This change makes `git_remote_name_is_valid` be part of the public
interface of the library. This is needed for other language bindings to
be able to find this symbol (like in git2go, when linking against
libgit2 dynamically).
|
| | |
|
|\ \
| |/
|/| |
|
| | |
|
| |\ |
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | | |
Also, add `git_commit_graph_writer_options_init`!
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change adds the git_commit_graph_writer_* functions to allow to
write and create `commit-graph` files from `.idx`/`.pack` files or
`git_revwalk`s.
Part of: #5757
|
|\ \ \ \
| | | | |
| | | | | |
buf: deprecate public git_buf writing functions
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
A `git_buf` is now a read-only structure as far as callers are
concerned. This is a mechanism that we can return data to callers
using memory that is owned by the library and can be cleaned up by
callers (using `git_buf_dispose`).
A `git_buf` can no longer be allocated by callers or provided to the
library.
|
|\ \ \ \
| | | | |
| | | | | |
filter: filter drivers stop taking git_buf as user input
|
| | | | | |
|
| |/ / / |
|
|\ \ \ \
| | | | |
| | | | | |
Introduce `create_commit_cb`, deprecate `signing_cb`
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The signing callback should not be used; instead, callers should provide
a commit_create_cb, perform the signing and commit creation themselves.
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Introduce a new mechanism for `git_rebase_commit` for callers to
customize the experience. Instead of assuming that we produce the
commit for them, provide a commit creation callback that allows callers
to produce the commit themselves and return the resulting commit id.
|
|\ \ \ \
| |_|_|/
|/| | | |
remote: introduce remote_ready_cb, deprecate resolve_url callback
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Using a callback to set a resolve_url is not particularly idiomatic.
Deprecate it in favor of the `set_instance_url` and
`set_instance_pushurl` functions which can now be called from the
`git_remote_ready_cb` callback.
|
| | | |
| | | |
| | | |
| | | | |
Introduce a new callback that fires when the remote is ready to connect.
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
Users may want to override the URL on a particular instance of a remote,
instead of updating the configuration. Previously, users could use a
callback to do this, but this is not particularly idiomatic.
|
|\ \ \
| | | |
| | | | |
Checkout dry-run
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
working directory
|
|\ \ \ \
| | | | |
| | | | | |
midx: Introduce git_odb_write_multi_pack_index()
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This change introduces git_odb_write_multi_pack_index(), which creates a
`multi-pack-index` file from all the `.pack` files that have been loaded
in the ODB.
Fixes: #5399
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change adds the git_midx_writer_* functions to allow to
write and create `multi-pack-index` files from `.idx`/`.pack` files.
Part of: #5399
|
|\ \ \ \
| | | | |
| | | | | |
Use error code GIT_EAUTH for authentication failures
|
| |\ \ \ \
| | |/ / / |
|
| | | | | |
|
|\ \ \ \ \
| | |/ / /
| |/| | | |
|