| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Now that we've identified that our global settings really aren't global
at all, and refactored the library to match that, change global.c to
libgit2.c, which is especially nice since the prefix of the functions
matches the filename.
|
|
|
|
|
| |
Provide a mechanism for system components to register for initialization
and shutdown of the libgit2 runtime.
|
|
|
|
|
|
| |
We want to store a pointer to emulate `pthread_exit` on Windows. Do
this within the threading infrastructure so that it could potentially be
re-used outside of the context of libgit2 itself.
|
|
|
|
| |
We were never properly testing git_thread_exit. Do so.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our "global initialization" has accumulated some debris over the years.
It was previously responsible for both running the various global
initializers (that set up various subsystems) _and_ setting up the
"global state", which is actually the thread-local state for things
like error reporting.
Separate the thread local state out into "threadstate". Use the normal
subsystem initialization functions that we already have to set it up.
This makes both the global initialization system and the threadstate
system simpler to reason about.
|
|
|
|
|
|
| |
Ensure that we can allocate the error message buffer. In keeping with
our typical policiess, we allow (small) memory leaks in the case where
we're out of memory.
|
|
|
|
|
|
| |
Move the mwindow mutex into the mwindow code itself, initializing it in
the mwindow global initialization function instead of in the global
initializer.
|
|
|
|
|
| |
Move the settings global data teardown into its own separate function,
instead of intermingled with the global state.
|
|
|
|
|
| |
Move the MSVC C runtime debugging bits into the allocator's global init
function.
|
|
|
|
|
| |
Instead of treating win32 thread initialization specially in the win32
git_libgit2_init function, add a git_global_threads_init function.
|
|\
| |
| | |
Update PCRE to 8.44
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
We included their COPYING file, which was _not_ in fact their license.
Add the LICENSE file as well.
|
|\ \
| | |
| | | |
clone: update origin's HEAD
|
| | |
| | |
| | |
| | |
| | | |
Update `refs/remotes/origin/HEAD` as a symbolic link to the remote's
default branch.
|
| | |
| | |
| | |
| | |
| | | |
Ensure that we created `refs/remotes/origin/HEAD` when cloning, a
symbolic link pointing to `refs/remotes/origin/<default>`
|
|\ \ \
| | | |
| | | | |
Improve the support of atomics
|
| | | |
| | | |
| | | |
| | | | |
Instead, globally initialize the system page size.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This change:
* Starts using GCC's and clang's `__atomic_*` intrinsics instead of the
`__sync_*` ones, since the former supercede the latter (and can be
safely replaced by their equivalent `__atomic_*` version with the
sequentially consistent model).
* Makes `git_atomic64`'s value `volatile`. Otherwise, this will make
ThreadSanitizer complain.
* Adds ways to load the values from atomics. As it turns out,
unsynchronized read are okay only in some architectures, but if we
want to be correct (and make ThreadSanitizer happy), those loads
should also be performed with the atomic builtins.
* Fixes two ThreadSanitizer warnings, as a proof-of-concept that this
works:
- Avoid directly accessing `git_refcount`'s `owner` directly, and
instead makes all callers go through the `GIT_REFCOUNT_*()` macros,
which also use the atomic utilities.
- Makes `pool_system_page_size()` race-free.
Part of: #5592
|
|\ \ \
| | | |
| | | | |
Fix error return for invalid extensions.
|
|/ / / |
|
|\ \ \
| |/ /
|/| | |
Change bare free to allocator free (fixes #5653)
|
|/ /
| |
| |
| |
| | |
The info pointer was allocated with git__malloc, so needs to be free'd with git__free.
This bug can lurk pretty easily since if there's no custom allocator this is fine.
|
|\ \
| | |
| | | |
midx: Introduce a parser for multi-pack-index files
|
|/ /
| |
| |
| |
| |
| |
| | |
This change is the first in a series to add support for git's
multi-pack-index. This should speed up large repositories significantly.
Part of: #5399
|
|\ \
| | |
| | | |
Fixed typo in comment
|
| | |
| | |
| | | |
occured -> occurred
|
|\ \ \
| |_|/
|/| | |
Fix binary diff showing /dev/null
|
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes issue where a changed binary file's content in the working
tree isn't displayed correctly, instead showing an oid of zero,
and with its path being reported incorrectly as "/dev/null".
|
| | |
| | |
| | |
| | |
| | |
| | | |
Fix #5565
Pre-Android 5 did not implement a virtual filesystem atop FAT partitions for Unix permissions, which causes chmod to fail. However, Unix permissions have no effect on Android anyway as file permissions are not actually managed this way, so treating it as a no-op across all Android is safe.
|
|\ \ \
| | | |
| | | | |
httpclient: only free challenges for current_server type
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Prior to this commit we freed both the server and proxy auth challenges
in git_http_client_read_response. This works when the proxy needs auth
or when the server needs auth, but it does not work when both the proxy
and the server need auth as we erroneously remove the server auth
challenge before we have added them as server credentials. Instead only
remove the challenges for the current_server type.
Co-authored-by: Stephen Gelman <ssgelm@gmail.com>
|
|\ \ \ \
| | | | |
| | | | | |
Respect `init.defaultBranch` setting
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We don't use "master" as a hardcoded default in as many places; remove
the now unused master branch constant.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When the remote does not tell us its default, we have to guess what the
default branch should be. Use our local initial branch configuration to
inform the remote branch default when we clone.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We derive the branch name, even in our code, we shouldn't assume that
the branch will be "master".
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When cloning an empty repository, we need to guess what the branch
structure should be; instead of hardcoding `master`, use the
`init.defaultBranch` setting it if it provided.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The git_repository_isempty function now respects the init.defaultbranch
setting (instead of hardcoding "master") to understand if a repository
is empty or not.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Provide a helper function to get the initial branch for a repository,
respecting the `init.defaultBranch` configuration option, if set, and
returning the "default default" (currently `master`) otherwise.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
As part of a push towards more inclusive language, git is reconsidering
using "master" as the default branch name. As a first step, this
setting will be configurable with the `init.defaultBranch` configuration
option. Honor this during repository initialization.
During initialization, we will create an initial branch:
1. Using the `initial_head` setting, if specified;
2. Using the `HEAD` configured in a template, if it exists;
3. Using the `init.defaultBranch` configuration option, if it is set; or
4. Using `master` in the absence of additional configuration.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
patch_parse: handle absence of "index" header for new/deleted cases
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This follows up on 11de594f85479e4804b07dc4f7b33cfe9212bea0 which added
support for parsing patches without extended headers (the "index
<hash>..<hash> <mode>" line); issue #5267.
We now allow transition from "file mode" state to "path" state directly
if there is no "index", which will happen for patches adding or deleting
files as demonstrated in added test case.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
boolean config parsing fails in some cases with mapped values
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
git_config_lookup_map_value
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Fix config file parsing with multi line values containing quoted parts
|