- 01 Jun, 2018 3 commits
-
-
Patrick Steinhardt committed
-
These can't go into the public API yet as we don't want to introduce API or ABI changes in a security release.
Carlos Martín Nieto committed -
Carlos Martín Nieto committed
-
- 12 Mar, 2018 1 commit
-
-
Patrick Steinhardt committed
-
- 10 Mar, 2018 2 commits
-
-
Fixes #4492, #4496.
Adrián Medraño Calvo committed -
I'm not sure if worktree.h was intentionally left out of git2.h. Looks like an oversight since it is in fact documented.
apnadkarni committed
-
- 08 Mar, 2018 1 commit
-
-
Patrick Steinhardt committed
-
- 07 Mar, 2018 1 commit
-
-
Patrick Steinhardt committed
-
- 13 Jun, 2017 2 commits
-
-
Mohseen Mukaddam committed
-
Mohseen Mukaddam committed
-
- 12 Jun, 2017 1 commit
-
-
Disambiguate error values: return `GIT_ENOTFOUND` when the item cannot exist in the repository (perhaps because the repository is inmemory or otherwise not backed by a filesystem), return `-1` when there is a hard failure.
Edward Thomson committed
-
- 11 Jun, 2017 1 commit
-
-
Edward Thomson committed
-
- 08 Jun, 2017 1 commit
-
-
Initially, the setting has been solely used to enable the use of `fsync()` when creating objects. Since then, the use has been extended to also cover references and index files. As the option is not yet part of any release, we can still correct this by renaming the option to something more sensible, indicating not only correlation to objects. This commit renames the option to `GIT_OPT_ENABLE_FSYNC_GITDIR`. We also move the variable from the object to repository source code.
Patrick Steinhardt committed
-
- 04 Jun, 2017 1 commit
-
-
Edward Thomson committed
-
- 05 May, 2017 2 commits
-
-
The current signature of `git_worktree_prune` accepts a flags field to alter its behavior. This is not as flexible as we'd like it to be when we want to enable passing additional options in the future. As the function has not been part of any release yet, we are still free to alter its current signature. This commit does so by using our usual pattern of an options structure, which is easily extendable without breaking the API.
Patrick Steinhardt committed -
When creating a new worktree, we do have a potential race with us creating the worktree and another process trying to delete the same worktree as it is being created. As such, the upstream git project has introduced a flag `git worktree add --locked`, which will cause the newly created worktree to be locked immediately after its creation. This mitigates the race condition. We want to be able to mirror the same behavior. As such, a new flag `locked` is added to the options structure of `git_worktree_add` which allows the user to enable this behavior.
Patrick Steinhardt committed
-
- 02 May, 2017 1 commit
-
-
The `git_worktree_add` function currently accepts only a path and name for the new work tree. As we may want to expand these parameters in future versions without adding additional parameters to the function for every option, this commit introduces our typical pattern of an options struct. Right now, this structure is still empty, which will change with the next commit.
Patrick Steinhardt committed
-
- 01 May, 2017 1 commit
-
-
Edward Thomson committed
-
- 28 Apr, 2017 2 commits
-
-
Verifying hashsums of objects we are reading from the ODB may be costly as we have to perform an additional hashsum calculation on the object. Especially when reading large objects, the penalty can be as high as 35%, as can be seen when executing the equivalent of `git cat-file` with and without verification enabled. To mitigate for this, we add a global option for libgit2 which enables the developer to turn off the verification, e.g. when he can be reasonably sure that the objects on disk won't be corrupted.
Patrick Steinhardt committed -
The upstream git.git project verifies objects when looking them up from disk. This avoids scenarios where objects have somehow become corrupt on disk, e.g. due to hardware failures or bit flips. While our mantra is usually to follow upstream behavior, we do not do so in this case, as we never check hashes of objects we have just read from disk. To fix this, we create a new error class `GIT_EMISMATCH` which denotes that we have looked up an object with a hashsum mismatch. `odb_read_1` will then, after having read the object from its backend, hash the object and compare the resulting hash to the expected hash. If hashes do not match, it will return an error. This obviously introduces another computation of checksums and could potentially impact performance. Note though that we usually perform I/O operations directly before doing this computation, and as such the actual overhead should be drowned out by I/O. Running our test suite seems to confirm this guess. On a Linux system with best-of-five timings, we had 21.592s with the check enabled and 21.590s with the ckeck disabled. Note though that our test suite mostly contains very small blobs only. It is expected that repositories with bigger blobs may notice an increased hit by this check. In addition to a new test, we also had to change the odb::backend::nonrefreshing test suite, which now triggers a hashsum mismatch when looking up the commit "deadbeef...". This is expected, as the fake backend allocated inside of the test will return an empty object for the OID "deadbeef...", which will obviously not hash back to "deadbeef..." again. We can simply adjust the hash to equal the hash of the empty object here to fix this test.
Patrick Steinhardt committed
-
- 21 Apr, 2017 1 commit
-
-
Patrick Steinhardt committed
-
- 17 Apr, 2017 1 commit
-
-
As with the callbacks, third-party implementations of smart subtransports cannot reach into the opaque struct and thus cannot know what options the user set. Add a getter for these options to copy the proxy options into something external implementors can use.
Carlos Martín Nieto committed
-
- 03 Apr, 2017 2 commits
-
-
This can prevent FILE_SHARED_VIOLATIONS when used in tools such as TortoiseGit TGitCache and FILE_SHARE_DELETE, because files can be opened w/o being locked any more. Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed -
There are references to odb_backends.h when the file is actually named odb_backend.h and in the sys folder.
Remy Suen committed
-
- 01 Apr, 2017 1 commit
-
-
Provide a macro that will allow us to run a function with posix-like return values multiple times in a retry loop, with an optional cleanup function called between invocations.
Edward Thomson committed
-
- 21 Mar, 2017 1 commit
-
-
git_cred_acquire_cb isn't using the standard @param and @return tags. This is causing the generated documentation to not be formatted properly.
Remy Suen committed
-
- 20 Mar, 2017 1 commit
-
-
Remy Suen committed
-
- 17 Mar, 2017 1 commit
-
-
While we already provide functionality to look up a worktree from a repository, we cannot do so the other way round. That is given a repository, we want to look up its worktree if it actually exists. Getting the worktree of a repository is useful when we want to get certain meta information like the parent's location, getting the locked status, etc.
Patrick Steinhardt committed
-
- 15 Mar, 2017 1 commit
-
-
Patrick Steinhardt committed
-
- 03 Mar, 2017 1 commit
-
-
Include the SHA1 collision attack detection library from https://github.com/cr-marcstevens/sha1collisiondetection
Edward Thomson committed
-
- 28 Feb, 2017 3 commits
-
-
Rename `GIT_OPT_ENABLE_SYNCHRONIZED_OBJECT_CREATION` -> `GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION`.
Edward Thomson committed -
Allow users to enable `SYNCHRONIZED_OBJECT_CREATION` with a setting.
Edward Thomson committed -
We've had an fsync option for a long time, but it was "ignored". Stop ignoring it.
Edward Thomson committed
-
- 16 Feb, 2017 1 commit
-
-
David Catmull committed
-
- 13 Feb, 2017 6 commits
-
-
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.
Patrick Steinhardt committed -
Patrick Steinhardt committed
-
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.
Patrick Steinhardt committed -
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.
Patrick Steinhardt committed -
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.
Patrick Steinhardt committed -
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.
Patrick Steinhardt committed
-