- 12 Feb, 2023 3 commits
-
-
Ensure that we maintain the `core.repositoryFormatVersion` value instead of always overwriting it with the default.
Edward Thomson committed -
Provide an internal function to set the repository's `objectformat`, both in the internal object and in the configuration.
Edward Thomson committed -
Teach the repository about the `objectformat` extension, supporting `sha1` always and `sha256` when the experimental sha256 support is active.
Edward Thomson committed
-
- 09 Feb, 2023 1 commit
-
-
Edward Thomson committed
-
- 20 Jan, 2023 1 commit
-
-
211c9719 attempts to use the parsed OID but inverted the arguments to `git_oid_cpy`.
Edward Thomson committed
-
- 05 Jan, 2023 1 commit
-
-
`git_clone` checks for existence of (non-empty) directories that would clash with what is about to be cloned. This is problematic when cloning submodules since they make sense in the context of a parent module, so they should not use the current working dir. Since in `git_submodule_update` we clone the submodule only when it is not yet initialized we do not need to perform directory checks.
Aleš Bizjak committed
-
- 25 Nov, 2022 2 commits
-
-
This looks like a typo to me, from what i can see these lines were added at the same time and because of how capabilities are calculated, it's likely that this code will work in situations where these capabilities were the last ones.
Russell Sim committed -
If a submodule has been configured but not yet added, do not try to update it. Issue #6433: git_submodule_update fails to update configured but missing submodule
tagesuhu committed
-
- 19 Nov, 2022 1 commit
-
-
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed
-
- 10 Nov, 2022 1 commit
-
-
This should resolve some issues with UBSan builds by using unsigned 64-bit integers for all arithmetic until we finally convert to an offset or size value. Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Derrick Stolee committed
-
- 04 Nov, 2022 1 commit
-
-
The server and client negotiate a single hostkey, but the "best" cipher may not be the one for which we have an entry in `known_hosts`. This can lead to us not finding the key in known_hosts even though we should be connecting. Instead here we look up the hostname with a nonsense key to perform a lookup in the known hosts and set that. This is roughly what the OpenSSH client does as well.
Carlos Martín Nieto committed
-
- 03 Nov, 2022 4 commits
-
-
It is expensive to compute the sha1 of the entire commit-graph file each time we open it. Git only does this if it is re-writing the file. This patch will only verify the checksum when calling the external API git_commit_graph_open(), which explicitly says it opens and verifies the commit graph in the documentation. For internal library calls, we call git_commit_graph_get_file(), which mmaps the commit-graph file in read-only mode. Therefore it is safe to skip the validation check there. Tests were added to check that the validation works in the happy path, and prevents us from opening the file when validation fails. (Note from Derrick Stolee: This patch was applied internally at GitHub after we recognized the performance impact it had during an upgrade of libgit2. The original author left the company before we remembered to send it upstream.) Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Colin Stolley committed -
Julian Mesa committed
-
Julian Mesa committed
-
If the tag already exists and we are not forcing overwrite we need to free ref_name buffer before return the "tag already exists" error.
Julian Mesa committed
-
- 02 Nov, 2022 1 commit
-
-
It turns out this has been available in libssh2 for a long time and we should have been verifying this the whole time.
Carlos Martín Nieto committed
-
- 20 Oct, 2022 1 commit
-
-
Httpclient internally stores a copy of the certificate_check callback and payload. When connecting via HTTPS, and if the server sends back "Connection: close" after the first request, the following request would attempt to re-use the httpclient and call the (now outdated) callback. In particular for pygit2 this is a problem, since callbacks / payloads are only valid for the duration of a libgit2 call, leading to a ffi.from_handle() error and crashing the Python interpreter.
Sebastian Lackner committed
-
- 01 Oct, 2022 1 commit
-
-
Kevin Saul committed
-
- 19 Sep, 2022 2 commits
-
-
Not everybody builds libgit2 using cmake; provide an `experimental.h` with no experiments configured for those that do not. To support this, we also now create compile definitions for experimental functionality, to supplant that empty `experimental.h`. cmake will continue to generate the proper `experimental.h` file for use with `make install`.
Edward Thomson committed -
Only allow the remote default branch checking to fail when the remote default branch doesn't exist (`git_remote__default_branch` returns `GIT_ENOTFOUND`). If there was any other type of error - for example, an allocation failure - we should not swallow that and continue to fail. This allows us to support the case when a remote has not advertised a HEAD -- this is possible, for example, when the remote has constrained the caller to a particular namespace. But other remote failures remain as failures.
Edward Thomson committed
-
- 31 Aug, 2022 1 commit
-
-
Miguel Arroz committed
-
- 30 Jul, 2022 1 commit
-
-
In commit 6bb35878 ("clone: set refs/remotes/origin/HEAD to default branch when branch is specified, attempt 2") libgit2 was changed to set the default remote branch when one was copied. But it makes update_head_to_branch() return an error if the origin doesn't even *have* a HEAD in the first place, since git_remote_default_branch() will fail. That's entirely wrong, and means that you cannot do "git_clone()" of a particular branch on a remote repository when that remote doesn't have a default branch at all. So don't set the error code. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds committed
-
- 22 Jul, 2022 1 commit
-
-
Kevin Saul committed
-
- 20 Jul, 2022 1 commit
-
-
I want to push a commit by OID to a remote branch. Currently, push parses the refspecs such that the source must be the name of a ref (it uses git_reference_name_to_id to resolve it). This commit changes it so push uses git_revparse_single to resolve the source of the refspec. This allows for OIDs or other revs (e.g. `HEAD~2`) to be pushed.
Sven Over committed
-
- 14 Jul, 2022 1 commit
-
-
The experimental function signature is only available when `GIT_EXPERIMENTAL_SHA256` is enabled.
Edward Thomson committed
-
- 13 Jul, 2022 2 commits
-
-
Edward Thomson committed
-
Edward Thomson committed
-
- 12 Jul, 2022 2 commits
-
-
In the ownership checks implemented for CVE-2022-24765, we disallowed users to access their own repositories when running with `sudo`. Examine the `SUDO_UID` environment variable and allow users running with `sudo`. This matches git's behavior.
Edward Thomson committed -
To match git's behavior with CVE 2022-29187, validate not only the working directory, but also the gitdir and gitlink (if it exists). This a follow up to CVE-2022-24765 that was fixed earlier.
Edward Thomson committed
-
- 09 Jul, 2022 1 commit
-
-
Pack files v3 are introduced in the SHA256 hash transition document https://github.com/git/git/blob/master/Documentation/technical/hash-function-transition.txt Obviously we do not support these yet. Stop pretending that we do.
Edward Thomson committed
-
- 07 Jul, 2022 4 commits
-
-
Allow users in the administrator group to use git configs that are owned by administrators.
Edward Thomson committed -
Refactor the file ownership checks so that callers can provide discrete information about the ownership expectations to a single function.
Edward Thomson committed -
This reverts commit cdff2f02. This change erroneously allowed system users to own a worktree; this should only be allowed when the current user is in the Administrator group on Windows as well.
Edward Thomson committed -
Edward Thomson committed
-
- 28 Jun, 2022 1 commit
-
-
Kevin Saul committed
-
- 27 Jun, 2022 1 commit
-
-
Tengfei committed
-
- 22 Jun, 2022 1 commit
-
-
John Alden committed
-
- 20 Jun, 2022 3 commits
-
-
libgit2 can be built with optional, experimental sha256 support. This allows consumers to begin testing and providing feedback for our sha256 support while we continue to develop it, and allows us to make API breaking changes while we iterate on a final sha256 implementation. The results will be `git2-experimental.dll` and installed as `git2-experimental.h` to avoid confusion with a production libgit2.
Edward Thomson committed -
Linux has a /usr/include/features.h, which gets confusing; update this to `git2_features.h` and move it into the `util` directory.
Edward Thomson committed -
Teach the loose object database how to cope with SHA256 objects.
Edward Thomson committed
-