| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
|
|/ / / |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
revwalk: make mark_unintersting use a loop
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
Using a recursive function can blow the stack when dealing with long
histories. Use a loop instead to limit the call chain depth.
This fixes #1223.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Now that #1785 is merged, git_odb_stream_finalize_write() calculates the object id before invoking the odb backend.
This commit gives a chance to the backend to check if it already knows this object.
|
|\ \ \
| |_|/
|/| | |
Fix umask fragility
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The GIT_MODE_TYPE macro was looking at all bits above the
permissions, but it should really just look at the top bits so
that it will give the right results for a setgid or setuid entry.
Since we're now using these macros in the tests, this was causing
a test failure on platforms that don't support setgid.
|
| | |
| | |
| | |
| | |
| | |
| | | |
This adds some more macros for some standard operations on file
modes, particularly related to permissions, and then updates a
number of places around the code base to use the new macros.
|
|\ \ \
| |/ /
|/| | |
Fix warning in src/win32/version.h
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Of backends and refreshers...
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously, `git_object_read()`, `git_object_read_prefix()` and
`git_object_exists()` were implementing an auto refresh logic. When the
expected object couldn't be found in any backend, a call to
`git_odb_refresh()` was triggered and the lookup was once again performed
against all backends.
This commit removes this auto-refresh logic from the odb layer and pushes
it down into the pack-backend (as it's the only one currently exposing
a `refresh()` endpoint).
|
| | | | |
|
| | | | |
|
| |/ /
|/| | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Minor changes for rewrites
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Ensure that we apply splits to rewrites, even if we're not
interested in examining it closely for rename/copy detection.
In keeping with core git, status should not display rewrites,
it should simply show files as "modified".
|
|\ \ \ \
| | | | |
| | | | | |
path: properly resolve relative paths
|
| | | | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Fix incorrect precedence within git_repository_is_empty()
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This simplifies the git_repository_is_empty a bit so that a
detached HEAD is just taken to mean the repo is not empty, since
a newly initialized repo will not have a detached HEAD.
|
| | | | | |
|
| | |/ /
| |/| |
| | | |
| | | | |
Reverts part of 9146f1e57ec4f2b6fa293c78d54f1383464ff5be.
|
| | | | |
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | | |
All use of sortedcache will need this header, so put it in the
definition of the sortedcache API.
|
|\ \ \
| |/ /
|/| | |
Thread safety for the refdb_fs
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This loads SRWLock APIs at runtime and in their absence (i.e. on
Windows before Vista) falls back on a regular CRITICAL_SECTION
that will not permit concurrent readers.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This converts an internal lock from a write lock to a read lock
where write isn't needed, and also clarifies some doc things about
where various locks are acquired and how various APIs are intended
to be used.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This makes libgit2 require Windows Vista or newer if it is going
to be compiled with the THREADSAFE option
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This is the first use we have of pthread_rwlock_t in libgit2.
Hopefully it won't cause any serious portability problems.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds thread safety to the refdb_fs by using the new
git_sortedcache object and also by relaxing the handling of some
filesystem errors where the fs may be changed out from under us.
This also adds some new threading tests that hammer on the refdb.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The refdb_fs implementation calls realloc directly on a reference
object when it wants to rename it. It is not a public object, so
this doesn't mess with the immutability of references, but it does
assume certain constraints on the reference representation. This
commit wraps that assumption in an isolated API to isolate it.
|
| | |
| | |
| | |
| | | |
This adds two other APIs that I need to the sortedcache type.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds a convenient new data type for caching the contents of
file in memory when each item in that file corresponds to a name
and you need to both be able to lookup items by name and iterate
over them in some sorted order. The new data type has locks in
place to manage usage in a threaded environment.
|
| | |
| | |
| | |
| | |
| | |
| | | |
If there were symbolic refs among the loose refs then the code
to create packed-refs would fail trying to parse the OID out of
them (where Git just skips trying to pack them). This fixes it.
|
|\ \ \
| | | |
| | | | |
Even more lenient remote parsing
|