| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Like on Windows ':' is used for volume names in absolute paths.
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce GIT_OPT_SET_ODB_LOOSE_PRIORITY and GIT_OPT_SET_ODB_PACKED_PRIORITY
to allow overriding the default priority values for the default ODB
backends. Libgit2 has historically assumed that most objects for long-
running operations will be packed, therefore GIT_LOOSE_PRIORITY is
set to 1 by default, and GIT_PACKED_PRIORITY to 2.
When a client allows libgit2 to set the default backends, they can
specify an override for the two priority values in order to change
the order in which each ODB backend is accessed.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Change the default of the file limit to 0 (unlimited).
* Changed the heuristic to close files to be the file that contains the
least-recently-used window such that the window is the
most-recently-used in the file, and the file does not have in-use
windows.
* Parameterized the filelimit test to check for a limit of 1 and 100
open windows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are some cases in which repositories accrue a large number of
packfiles. The existing mwindow limit applies only to the total size of
mmap'd files, not on their number. This leads to a situation in which
having lots of small packfiles could exhaust the allowed number of open
files, particularly on macOS, where the default ulimit is very low
(256).
This change adds a new configuration parameter
(GIT_OPT_SET_MWINDOW_FILE_LIMIT) that sets the maximum number of open
packfiles, with a default of 128. This is low enough so that even macOS
users should not hit it during normal use.
Based on PR #5386, originally written by @josharian.
Fixes: #2758
|
|
|
|
|
| |
Stop returning a void for functions, future-proofing them to allow them
to fail.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow users to opt-in to expect/continue handling when sending a POST
and we're authenticated with a "connection-based" authentication
mechanism like NTLM or Negotiate.
If the response is a 100, return to the caller (to allow them to post
their body). If the response is *not* a 100, buffer the response for
the caller.
HTTP expect/continue is generally safe, but some legacy servers
have not implemented it correctly. Require it to be opt-in.
|
|
|
|
|
|
|
|
|
|
|
| |
Remove an `inttypes.h` header that is too large in scope, and far too
public.
For Visual Studio 2012 and earlier (ie, `_MSC_VER < 1800`), we do need
to include `stdint.h` in our public headers, for types like `uint32_t`.
Internally, we also need to define `PRId64` as a printf formatting
string when it is not available.
|
|
|
|
| |
'GIT_OPT_IGNORE_PACK_KEEP_FILE_CHECK'
|
|
|
|
|
| |
Recent GCC enables `-Wunused-const-variables`, which makes output quite
noisy. Disable unused warnings for our deprecated variables.
|
|
|
|
|
|
|
|
|
| |
Since we now always build the library with cdecl calling conventions,
our callbacks should be decorated as such so that users will not be able
to provide callbacks defined with other calling conventions.
The `GIT_CALLBACK` macro will inject the `__cdecl` attribute as
appropriate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The recommendation from engineers within Microsoft is that libraries
should have a calling convention specified in the public API, and that
calling convention should be cdecl unless there are strong reasons to
use a different calling convention.
We previously offered end-users the choice between cdecl and stdcall
calling conventions. We did this for presumed wider compatibility: most
Windows applications will use cdecl, but C# and PInvoke default to
stdcall for WINAPI compatibility. (On Windows, the standard library
functions are are stdcall so PInvoke also defaults to stdcall.)
However, C# and PInvoke can easily call cdecl APIs by specifying an
annotation.
Thus, we will explicitly declare ourselves cdecl and remove the option
to build as stdcall.
|
|
|
|
|
|
| |
git_object_t is the future; update the public API to use it. This will
also ensure that we can build our tests which make use of the old API
without modification (and without compiler warnings).
|
|
|
|
|
| |
Provide a utility to reset custom allocators back to their default.
This is particularly useful for testing.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the `GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY` option, which will cause
commands that reload the on-disk index to fail if the current
`git_index` has changed that have not been saved. This will prevent
users from - for example - adding a file to the index then calling a
function like `git_checkout` and having that file be silently removed
from the index since it was re-read from disk.
Now calls that would re-read the index will fail if the index is
"dirty", meaning changes have been made to it but have not been written.
Users can either `git_index_read` to discard those changes explicitly,
or `git_index_write` to write them.
|
|\
| |
| | |
pack: rename `git_packfile_stream_free`
|
| | |
|
|/
|
|
|
|
|
| |
Tie in the newly created infrastructure for swapping out memory
allocators into our settings code. A user can now simply use the new
option "GIT_OPT_SET_ALLOCATOR" with `git_libgit2_opts`, passing in an
already initialized allocator structure as vararg.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Rename `GIT_OPT_ENABLE_SYNCHRONIZED_OBJECT_CREATION` ->
`GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION`.
|
|
|
|
| |
Allow users to enable `SYNCHRONIZED_OBJECT_CREATION` with a setting.
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Most importantly, clarify what it means for HTTPS and SSH to be supported.
|
|/
|
|
|
| |
We changed the defaults on strict object creation - it is enabled by
default. Update the documentation to reflect that.
|
| |
|
|
|
|
|
|
|
|
|
| |
Clang's documentation parser, which we use in our documentation system
does not report any comments for functions which use size_t as a type.
The root cause is buried somewhere in libclang but we can work around it
by defining the type ourselves. This typedef makes sure that libclang
sees it and that we do not change its size.
|
|
|
|
|
|
|
|
|
| |
This ensures that when using OpenSSL a safe default set of ciphers
is selected. This is done so that the client communicates securely
and we don't accidentally enable unsafe ciphers like RC4, or even
worse some old export ciphers.
Implements the first part of https://github.com/libgit2/libgit2/issues/3682
|
|\
| |
| | |
Don't include inttypes if compiling for Mac/iOS
|
| |
| |
| |
| |
| |
| | |
This fixes an issue in Xcode 7.3 in objective-git where we get the error
"Include of non-modular header file in module". Not importing this
header again fixes the issue.
|
|/ |
|
| |
|
|
|
|
|
|
| |
Allow users to set the `git_libgit2_opts` search path for the
`GIT_CONFIG_LEVEL_PROGRAMDATA`. Convert `GIT_CONFIG_LEVEL_PROGRAMDATA`
to `GIT_SYSDIR_PROGRAMDATA` for setting the configuration.
|
|\
| |
| | |
git_index_entry__init_from_stat: set nsec fields in entry stats
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
The reason is that the types defined in libgit2's inttypes.h collide with system inttypes.h
3rd party library header files may directly reference MSVC's built-in inttypes.h
Fixes #3476
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
This makes them show up in the reference, even if the text itself isn't
the most descriptive.
These have been found with
grep -Przon '\n\ntypedef struct.*?\{' -- include
grep -Przon '\n\ntypedef enum.*?\{' -- include
|
|
|
|
| |
FLAG_BITS only seems to be used internally
|
|\
| |
| | |
Add support for setting the SSL CA location
|
| |
| |
| |
| |
| | |
This allows users to specify self-signed certificates, or to provide their
own certificate stores on limited platforms such as mobile phones.
|
|/ |
|
|
|
|
|
| |
The default cache size is 256 megabytes, not megabits as claimed in the
docs.
|