Commit Graph

10689 Commits

Author SHA1 Message Date
Carlos Martín Nieto
061a0ad1f9 settings: don't hard-code HTTPS capability
This partially reverts bdec62dce1 which activates
the transport code-paths which allow you to use a custom TLS implementation
without having to have one at build-time.

However the capabilities describe how libgit2 was built, not what it could
potentially support, bring back the ifdefs so we only say we support HTTPS if
libgit2 was itself built with a TLS implementation.
2016-12-17 14:23:35 +00:00
Carlos Martín Nieto
428e18f8d4 Bump version to 0.24.5 2016-12-17 10:47:29 +00:00
Carlos Martín Nieto
c655def117 Merge pull request #4031 from libgit2/cmn/plug-test-leak
rebase: plug a leak in the tests
2016-12-17 01:12:49 +00:00
Carlos Martín Nieto
f7dcd58cc7 rebase: plug a leak in the tests 2016-12-17 00:55:06 +00:00
Carlos Martín Nieto
302aff9695 Bump version to 0.24.4 2016-12-16 23:55:06 +00:00
Carlos Martín Nieto
14d11f5a07 Merge pull request #4012 from libgit2/cmn/openssl-maint
Add support for OpenSSL 1.1.0 for BIO filter
2016-12-16 23:52:12 +00:00
Carlos Martín Nieto
6ab65b80b4 refdb: bubble up recursive rm when locking a ref
Failure to bubble up this error means some locking errors do not get reported as
such on Windows.
2016-12-16 11:33:54 +00:00
Edward Thomson
c5e6ba2892 Merge pull request #4029 from libgit2/cmn/windows-no-concurrent-compress
refdb: disable concurrent compress in the threading tests on Windows
2016-12-15 18:19:49 -06:00
Carlos Martín Nieto
9d5f12ffd7 Merge pull request #4018 from pks-t/pks/various-fixes
Various fixes
2016-12-12 22:43:11 +00:00
Carlos Martín Nieto
b31283a658 refdb: disable concurrent compress in the threading tests on Windows
This is far from an ideal situation, but this causes issues on Windows which
make it harder to develop anything, as these tests hit issues which relate
specifically to the Windows filesystem like permission errors for files we
should be able to access. There is an issue likely related to the ordering of
the repack, but there's enough noise that it does not currently help us to run
this aspect of the test in CI.
2016-12-12 17:09:12 +00:00
Michael Tesch
87aaefe20b write_tree: use shared buffer for writing trees
The function to write trees allocates a new buffer for each tree.
This causes problems with performance when performing a lot
of actions involving writing trees, e.g. when doing many merges.
Fix the issue by instead handing in a shared buffer, which is then
re-used across the calls without having to re-allocate between
calls.
2016-12-12 10:46:05 -05:00
Patrick Steinhardt
ff5eea06a9 pack: dereference cached pack entry on error
When trying to uncompress deltas in a packfile's delta chain, we try to
add object bases to the packfile cache, subsequently decrementing its
reference count if it has been added successfully. This may lead to a
mismatched reference count in the case where we exit the loop early due
to an encountered error.

Fix the issue by decrementing the reference count in error cleanup.
2016-12-12 09:45:07 +01:00
Patrick Steinhardt
34b320535b Fix potential use of uninitialized values 2016-12-12 09:16:33 +01:00
Patrick Steinhardt
e781a0c52f graph: flag fields should be declared as unsigned 2016-12-12 09:16:33 +01:00
Patrick Steinhardt
482d17484e transports: smart: do not redeclare loop counters 2016-12-12 09:16:33 +01:00
Patrick Steinhardt
6cf575b1ad path: remove unused local variable 2016-12-12 09:16:33 +01:00
Patrick Steinhardt
013ecb4f2a revwalk: do not re-declare commit variable 2016-12-12 09:16:33 +01:00
Patrick Steinhardt
8468a44067 odb_mempack: mark zero-length array as GIT_FLEX_ARRAY 2016-12-12 09:16:33 +01:00
Patrick Steinhardt
ab0cc5a059 clar: mark cl_git_thread_check() as inline
The function `cl_git_thread_check()` is defined as static. As the
function is defined in a header file which is included by our
tests, this can result in warnings for every test file where
`cl_git_thread_check` is never used.

Fix the issue by marking it as inline instead.
2016-12-12 09:16:33 +01:00
Edward Thomson
8339c66068 Merge pull request #4020 from novalis/rebase-detached
git_rebase_init: correctly handle detached HEAD
2016-12-07 17:44:25 +00:00
Edward Thomson
15769731a2 Merge pull request #4014 from bokic/patch-1
Properly pass `wchar *` type to giterr_set
2016-12-07 15:01:20 +00:00
Boris Barbulovski
9af59f5dcd Properly pass wchar * type to giterr_set 2016-12-06 03:08:52 +01:00
Edward Thomson
5c18ece35f Merge pull request #4022 from josharian/patch-1
remote: fix typo in git_fetch_init_options docs
2016-12-04 15:58:40 +00:00
Josh Bleecher Snyder
72cee16890 remote: fix typo in git_fetch_init_options docs 2016-12-02 16:14:47 -08:00
David Turner
4db1fc7e5e git_rebase_init: correctly handle detached HEAD
git_rebase_finish relies on head_detached being set, but
rebase_init_merge was only setting it when branch->ref_name was unset.
But branch->ref_name would be set to "HEAD" in the case of detached
HEAD being either implicitly (NULL) or explicitly passed to
git_rebase_init.
2016-12-01 23:11:57 -05:00
Elliot Saba
236a690ce4 Allow Windows with WinHTTP to use external http-parser 2016-11-20 22:46:01 -08:00
Boris Barbulovski
86364af995 Properly pass wchar * type to giterr_set 2016-11-20 11:30:45 +01:00
Carlos Martín Nieto
65d24fd7dd Add support for OpenSSL 1.1.0 for BIO filter 2016-11-19 17:54:36 +01:00
Carlos Martín Nieto
ae5838f118 Merge pull request #4010 from libgit2/ethomson/clar_threads
Introduce some clar helpers for child threads
2016-11-18 21:01:51 +01:00
Edward Thomson
6367c58cd4 tests: handle life without threads 2016-11-18 19:00:14 +00:00
Edward Thomson
6a05c7a0ef threads::refdb tests: use new threaded clar assert 2016-11-18 16:52:28 +00:00
Edward Thomson
bbf22f8229 clar: Introduce assertion helpers for threads
Don't `cl_git_pass` in a child thread.  When the assertion fails, clar
will `longjmp` to its error handler, but:

> The effect of a call to longjmp() where initialization of the jmp_buf
> structure was not performed in the calling thread is undefined.

Instead, set up an error context that threads can populate, and the
caller can check.
2016-11-18 16:52:28 +00:00
Edward Thomson
99479062db core::init tests: reverse init/shutdown
We want a predictable number of initializations in our multithreaded
init test, but we also want to make sure that we have _actually_
initialized `git_libgit2_init` before calling `git_thread_create` (since
it now has a sanity check that `git_libgit2_init` has been called).

Since `git_thread_create` is internal-only, keep this sanity check.
Flip the invocation so that we `git_libgit2_init` before our thread
tests and `git_libgit2_shutdown` again after.
2016-11-18 16:52:28 +00:00
Edward Thomson
82f15896de threads: introduce git_thread_exit
Introduce `git_thread_exit`, which will allow threads to terminate at an
arbitrary time, returning a `void *`.  On Windows, this means that we
need to store the current `git_thread` in TLS, so that we can set its
`return` value when terminating.

We cannot simply use `ExitThread`, since Win32 returns `DWORD`s from
threads; we return `void *`.
2016-11-18 07:34:09 -05:00
Carlos Martín Nieto
6b0510e5e1 Merge pull request #4009 from pranitbauva1997/fix-string-format
use `giterr_set_str()` wherever possible
2016-11-17 15:45:23 +01:00
Pranit Bauva
65b78ea301 use giterr_set_str() wherever possible
`giterr_set()` is used when it is required to format a string, and since
we don't really require it for this case, it is better to stick to
`giterr_set_str()`.

This also suppresses a warning(-Wformat-security) raised by the compiler.

Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
2016-11-17 01:12:12 +05:30
Carlos Martín Nieto
a6763ff93a Merge pull request #4007 from libgit2/cmn/bump-v25
Bump version number to v0.25
2016-11-15 19:04:18 +01:00
Carlos Martín Nieto
0cd162be88 Merge pull request #4008 from pks-t/pks/sortedcache-fd-leak
sortedcache: plug leaked file descriptor
2016-11-15 16:28:10 +01:00
Patrick Steinhardt
613381fc14 patch_parse: fix memory leak 2016-11-15 13:33:05 +01:00
Patrick Steinhardt
24b2182c5a sortedcache: plug leaked file descriptor 2016-11-15 12:53:53 +01:00
Carlos Martín Nieto
1db3035d74 Merge pull request #3996 from pks-t/pks/curl-lastsocket-deprecation
curl_stream: use CURLINFO_ACTIVESOCKET if curl is recent enough
2016-11-15 12:18:49 +01:00
Carlos Martín Nieto
5569778a52 Bump version number to v0.25 2016-11-15 11:15:40 +01:00
Carlos Martín Nieto
f5ea9d4a5f Merge pull request #3962 from libgit2/ethomson/issue_template
Introduce a GitHub Issue Template
2016-11-15 11:02:30 +01:00
Carlos Martín Nieto
7ebf099d79 Merge pull request #4004 from libgit2/cmn/changelog
CHANGELOG: fill in some updates we missed
2016-11-15 10:54:15 +01:00
Patrick Steinhardt
5cbd52607c curl_stream: use CURLINFO_ACTIVESOCKET if curl is recent enough
The `CURLINFO_LASTSOCKET` information has been deprecated since
curl version 7.45.0 as it may result in an overflow in the
returned socket on certain systems, most importantly on 64 bit
Windows. Instead, a new call `CURLINFO_ACTIVESOCKET` has been
added which instead returns a `curl_socket_t`, which is always
sufficiently long to store a socket.

As we need to provide backwards compatibility with curl versions
smaller than 7.45.0, alias CURLINFO_ACTIVESOCKET to
CURLINFO_LASTSOCKET on platforms without CURLINFO_ACTIVESOCKET.
2016-11-15 09:12:40 +01:00
Edward Thomson
1d683c1d2e Merge pull request #4006 from libgit2/cmn/compress-buf-free
Plug a leak in the refs compressor
2016-11-14 19:21:56 +00:00
Edward Thomson
8c984fea02 Introduce a GitHub Issue Template 2016-11-14 17:16:37 +00:00
Carlos Martín Nieto
06de4e759a CHANGELOG: fill in some updates we missed 2016-11-14 17:58:58 +01:00
Carlos Martín Nieto
21e0fc32ab Plug a leak in the refs compressor 2016-11-14 17:55:49 +01:00
Carlos Martín Nieto
a39f18ac77 Merge pull request #3998 from pks-t/pks/repo-discovery
Repository discovery starting from files
2016-11-14 17:10:43 +01:00