| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
The `git_error_set` function is useful for callers who implement
backends and advanced callbacks. Expose it.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Update the version number in main to v1.5.0-alpha. This helps people
understand that the main builds are not part of the v1.4.0 release
train.
We use "alpha" to indicate builds out of main (or nightlies) as semver
v2 requires the prerelease component is compared lexicographically.
Thus, our "beta" and "rc" releases should follow.
|
| | |
|
| |\
| |
| | |
merge: fix overlap between GIT_MERGE_FILE_FAVOR__CONFLICTED and GIT_MERGE_FILE_SIMPLIFY_ALNUM
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| | |
Allocate flags in git_merge_flag_t and git_merge_file_flag_t
for internal usage to prevent accidental double allocation.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
When we know the file size (because we're producing it from a working
directory iterator, or an index with an up-to-date cache) then set a
flag indicating as such. This removes the ambiguity about a 0 file
size, which could indicate that a file exists and is 0 bytes, or that we
haven't read it yet.
|
| |\ \
| |/
|/| |
Fetch by object id
|
| | | |
|
| | | |
|
| |\ \
| |/
|/| |
SHA256: early preparation
|
| | |
| |
| |
| |
| | |
Deprecate the `git_packfile_hash` function. Callers should use the new
`git_packfile_name` function which provides a unique packfile name.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The index's checksum is not an object ID, so we should not use the
`git_oid` type. Use a byte array for checksum calculation and storage.
Deprecate the `git_indexer_hash` function. Callers should use the new
`git_indexer_name` function which provides a unique packfile name.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The index's checksum is not an object ID, so we should not use the
`git_oid` type. Use a byte array for checksum calculation and storage.
Deprecate the `git_index_checksum` function without a replacement. This
is an abstraction that callers should not care about (and indeed do not
seem to be using).
Remove the unused `git_index__changed_relative_to` function.
|
| |/ |
|
| |\
| |
| | |
Improve documentation
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Give callers the ability to select how to handle redirects - either
supporting redirects during the initial connection (so that, for
example, `git.example.com/repo` can redirect to `github.com/example/repo`)
or all/no redirects. This is for compatibility with git.
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The existing mechanism for providing options to remote fetch/push calls,
and subsequently to transports, is unsatisfactory. It requires an
options structure to avoid breaking the API and callback signatures.
1. Introduce `git_remote_connect_options` to satisfy those needs.
2. Add a new remote connection API, `git_remote_connect_ext` that will
take this new options structure. Existing `git_remote_connect` calls
will proxy to that. `git_remote_fetch` and `git_remote_push` will
proxy their fetch/push options to that as well.
3. Define the interaction between `git_remote_connect` and fetch/push.
Connect _may_ be called before fetch/push, but _need not_ be. The
semantics of which options would be used for these operations was
not specified if you specify options for both connect _and_ fetch.
Now these are defined that the fetch or push options will be used
_if_ they were specified. Otherwise, the connect options will be
used if they were specified. Otherwise, the library's defaults will
be used.
4. Update the transports to understand `git_remote_connect_options`.
This is a breaking change to the systems API.
|
| | | |
|
| |/ |
|
| | |
|
| |
|
|
|
|
| |
Extend the `git_worktree_add_options` to include `git_checkout_options`.
github issue #5949
|
| |
|
|
|
| |
Introduce `git_blob_data_is_binary` to examine a blob's data, instead of
the blob itself. A replacement for `git_buf_is_binary`.
|
| |
|
|
|
| |
Users may want to validate raw object content; provide them a function
to do so.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Return `GIT_EINVALID` on parse errors so that direct callers of parse
functions can determine when there was a failure to parse the object.
The object parser functions will swallow this error code to prevent it
from propagating down the chain to end-users. (`git_merge` should not
return `GIT_EINVALID` when a commit it tries to look up is not valid,
this would be too vague to be useful.)
The only public function that this affects is
`git_signature_from_buffer`, which is now documented as returning
`GIT_EINVALID` when appropriate.
|
| | |
|
| |
|
|
|
| |
To accommodate less capable compilers.
Co-authored-by: Peter Pettersson <85582231+boretrk@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Looking up a non-existent object currently always invokes
`git_odb_refresh`. If looking up a large batch of objects, many of which
may legitimately not exist, this will repeatedly refresh the ODB to no
avail.
Add a `git_odb_exists_ext` that accepts flags controlling the ODB
lookup, and add a flag to suppress the refresh. This allows the user to
control if and when they refresh (for instance, refreshing once before
starting the batch).
|
| |
|
|
|
|
|
| |
Commit b1a6c316a6070fac4ab1ec5792979838f7145c39 moved auto-refresh into
the pack backend, and added a comment accordingly. Commit
43820f204ea32503b4083e3b6b83f30a0a0031c9 moved auto-refresh back *out*
of backends into the ODB layer, but didn't update the comment.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|