| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The functions `git_commit_header_field` and
`git_commit_extract_signature` both receive buffers used to hand back
the results to the user. While these functions called `git_buf_sanitize`
on these buffers, this is not the right thing to do, as it will simply
initialize or zero-terminate passed buffers. As we want to overwrite
contents, we instead have to call `git_buf_clear` to completely reset
them.
|
|\ \
| |/
|/| |
Changes to provide option to turn off/on ofs_delta
|
| |
| |
| |
| | |
This change provides an option in git_libgit2_opt_t which can be used in git_libgit2_opts to turn off/on ofs_delta capability in libGit2
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Implement a new function that is able to determine if a branch is
checked out in any repository connected to the current
repository. In particular, this is required to check if for a
given repository and branch, there exists any working tree
connected to that repository that is referencing this branch.
|
| |
| |
| |
| |
| |
| | |
Implement `git_repository_head_for_worktree` and
`git_repository_head_detached_for_worktree` for directly accessing a
worktree's HEAD without opening it as a `git_repository` first.
|
| |
| |
| |
| |
| |
| |
| | |
Implement the `git_worktree_prune` function. This function can be
used to delete working trees from a repository. According to the
flags passed to it, it can either delete the working tree's
gitdir only or both gitdir and the working directory.
|
| |
| |
| |
| |
| |
| | |
Working trees support locking by creating a file `locked` inside
the tree's gitdir with an optional reason inside. Support this
feature by adding functions to get and set the locking status.
|
| |
| |
| |
| |
| | |
Implement the `git_worktree_add` function which can be used to create
new working trees for a given repository.
|
| |
| |
| |
| |
| |
| | |
Add a new function that checks wether a given `struct
git_worktree` is valid. The validation includes checking if the
gitdir, parent directory and common directory are present.
|
| |
| |
| |
| |
| | |
Add function `git_repository_open_from_worktree`, which allows to open a
`git_worktree` as repository.
|
| |
| |
| |
| |
| |
| |
| | |
Introduce a new `struct git_worktree`, which holds information
about a possible working tree connected to a repository.
Introduce functions to allow opening working trees for a
repository.
|
| |
| |
| |
| |
| |
| | |
Add new module for working trees with the `git_worktree_list`
function. The function lists names for all working trees of a
certain repository.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The commondir variable stores the path to the common directory.
The common directory is used to store objects and references
shared across multiple repositories. A current use case is the
newly introduced `git worktree` feature, which sets up a separate
working copy, where the backing git object store and references
are pointed to by the common directory.
|
|/
|
|
| |
The options parameter in both git_stash_apply and git_stash_pop can
be NULL. They should be flagged as such in the documentation.
|
|
|
|
| |
The check_outs argument can be NULL and should be flagged accordingly
in the header file.
|
|
|
|
| |
The given_opts argument can actually be NULL and thus should be
flagged accordingly in the header file.
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| | |
Fixups requested in #3912.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introduce GIT_OPT_ENABLE_SYMBOLIC_REF_TARGET_VALIDATION option.
Setting this option to 0 allows
validation of a symbolic ref's target to be bypassed.
This option is enabled by default.
This mechanism is added primarily to address a discrepancy between git
behaviour and libgit2 behaviour, whereby the former allows the symbolic
ref target to carry an arbitrary string and the latter does not, so:
$ git symbolic-ref refs/heads/foo bar
$ cat .git/refs/heads/foo
ref: bar
where as attempting the same via libgit2 raises an error:
The given reference name 'bar' is not valid
this mechanism also allows those that might want to make use of
git's more lenient treatment of symbolic ref targets to do so.
|
|\ \
| | |
| | | |
Use a shared buffer in calls of git_treebuilder_write to avoid heap contention
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The function to write trees allocates a new buffer for each tree.
This causes problems with performance when performing a lot
of actions involving writing trees, e.g. when doing many merges.
Fix the issue by instead handing in a shared buffer, which is then
re-used across the calls without having to re-allocate between
calls.
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Added `git_repository_submodule_cache_all` to initialze a cache of
submodules on the repository so that operations looking up N
submodules are O(N) and not O(N^2). Added a
`git_repository_submodule_cache_clear` function to remove the cache.
Also optimized the function that loads all submodules as it was itself
O(N^2) w.r.t the number of submodules, having to loop through the
`.gitmodules` file once per submodule. I changed it to process the
`.gitmodules` file once, into a map.
Signed-off-by: David Turner <dturner@twosigma.com>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
When `GIT_MERGE_FIND_RENAMES` is set, provide a default for
`rename_threshold` when it is unset.
|
| |\ \ \
| | | | |
| | | | | |
Documentation fixes
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Most importantly, clarify what it means for HTTPS and SSH to be supported.
|
| | | | | |
|
| | | | | |
|
| |/ / / |
|
| | | |
| | | |
| | | |
| | | | |
Fix @return description of git_patch_num_lines_in_hunk.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Update the `GIT_SUBMODULE_UPDATE_OPTIONS_INIT` definition with the
correct values after removing `clone_checkout_strategy` in
`git_submodule_update_options`.
|
|/ / /
| | |
| | |
| | |
| | | |
Remove `clone_checkout_strategy` in `git_submodule_update_options` as
per issue #3784.
|
| | |
| | |
| | |
| | |
| | | |
We changed the defaults on strict object creation - it is enabled by
default. Update the documentation to reflect that.
|
| | |
| | |
| | |
| | |
| | |
| | | |
It changed from implementation-defined to git's default sorting, as there are
systems (e.g. rebase) which depend on this order. Also specify more explicitly
how you can get git's "date-order".
|
| | | |
|
| |/
|/|
| |
| |
| |
| | |
When creating and printing diffs, deal with binary deltas that have
binary data specially, versus diffs that have a binary file but lack the
actual binary data.
|
|/
|
|
|
|
|
| |
Support reading and writing index v4. Index v4 uses a very simple
compression scheme for pathnames, but is otherwise similar to index v3.
Signed-off-by: David Turner <dturner@twitter.com>
|
| |
|
|
|
|
|
|
| |
When writing an object, we calculate its OID and see if it exists in the
object database. If it does, we need to freshen the file that contains
it.
|
|
|
|
|
| |
Move `id_abbrev` to a more reasonable place where it packs more nicely
(before anybody starts using it).
|
|
|
|
|
|
|
|
| |
After 1cd65991, we were passing a pointer to an `unsigned long` to
a function that now expected a pointer to a `size_t`. These types
differ on 64-bit Windows, which means that we trash the stack.
Use `size_t`s in the packbuilder to avoid this.
|