|
211e117a
|
2016-04-12T00:18:17
|
|
Merge pull request #3739 from ethomson/0.24.1
Backport bug fixes to 0.24
|
|
8edadbf9
|
2016-03-07T17:37:17
|
|
index::racy: force racy entry
Instead of hoping that we can get a racy entry by going real fast
and praying real hard, just create a racy entry.
|
|
ccfacb8b
|
2016-03-31T10:43:57
|
|
leaks: call `xdl_free_classifier`
|
|
6a35e74c
|
2016-03-30T17:47:05
|
|
leaks: fix some leaks in the tests
|
|
2c1bc36d
|
2016-03-29T14:47:31
|
|
Plug a few leaks
|
|
5cc7a5c7
|
2016-04-11T13:39:31
|
|
tests: skip the unreadable file tests as root
When running as root, skip the unreadable file tests, because, well,
they're probably _not_ unreadable to root unless you've got some
crazy NSA clearance-level honoring operating system shit going on.
|
|
1d59c85a
|
2016-03-17T00:47:50
|
|
status: update test to include valid OID
|
|
af753aba
|
2016-03-22T00:18:44
|
|
tree: drop the now-unnecessary entries vector
Remove the now-unnecessary entries vector. Add `git_array_search`
to binary search through an array to accomplish this.
|
|
ba52879b
|
2016-04-11T11:37:02
|
|
reset: use real ids for the tests
This lets us run with strict object creation on.
|
|
13ebf7bd
|
2016-03-20T12:01:45
|
|
tree: store the entries in a growable array
Take advantage of the constant size of tree-owned arrays and store them
in an array instead of a pool. This still lets us free them all at once
but lets the system allocator do the work of fitting them in.
|
|
26f2cefb
|
2016-03-20T11:00:12
|
|
tree: re-use the id and filename in the odb object
Instead of copying over the data into the individual entries, point to
the originals, which are already in a format we can use.
|
|
17789083
|
2016-04-01T14:33:42
|
|
ignore: don't use realpath to canonicalize path
If we're looking for a symlink, realpath will give us the resolved path,
which is not what we're after, but a canonicalized version of the path
the user asked for.
|
|
21d8832e
|
2016-03-28T08:56:13
|
|
config::write::repeated: init our buffer
|
|
a13c1ec2
|
2016-03-28T11:13:51
|
|
config: don't write section header if we're in it
If we hit the EOF while trying to write a new value, it may be that
we're already in the section that we were looking for. If so, do not
write a (duplicate) section header, just write the value.
|
|
e8d5df9e
|
2016-03-04T14:51:16
|
|
config: show we write a spurious duplicated section header
We should notice that we are in the correct section to add. This is a
cosmetic bug, since replacing any of these settings does work.
|
|
b6130fe1
|
2016-04-11T11:50:11
|
|
refs::create: strict object creation on by default
When we turned strict object creation validation on by default, we
forgot to inform the refs::create tests of this. They, in fact,
believed that strict object creation was off by default. As a result,
their cleanup function went and turned strict object creation off for
the remaining tests.
|
|
3e2e8240
|
2016-04-11T17:43:07
|
|
refs: provide a more general error message for dwim
If we cannot dwim the input, set the error message to be explicit about
that. Otherwise we leave the error for the last failed lookup, which
can be rather unexpected as it mentions a remote when the user thought
they were trying to look up a branch.
|
|
ab062a39
|
2016-04-06T10:37:30
|
|
tests: fix core/stream test when built with openssl off
When passing -DUSE_OPENSSL:BOOL=OFF to cmake the testsuite will
fail with the following error:
core::stream::register_tls [/tmp/libgit2/tests/core/stream.c:40]
Function call failed: (error)
error -1 - <no message>
Fix test to assume failure for tls when built without openssl.
While at it also fix GIT_WIN32 cpp to check if it's defined
or not.
|
|
fe1f4777
|
2016-03-31T11:35:53
|
|
Add a no-op size_t typedef for the doc parser
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.
|
|
56da07cb
|
2016-03-31T11:32:36
|
|
xdiff/xprepare: fix a memory leak
The xdl_prepare_env() function may initialise an xdlclassifier_t
data structure via xdl_init_classifier(), which allocates memory
to several fields, for example 'rchash', 'rcrecs' and 'ncha'.
If this function later exits due to the failure of xdl_optimize_ctxs(),
then this xdlclassifier_t structure, and the memory allocated to it,
is not cleaned up.
In order to fix the memory leak, insert a call to xdl_free_classifier()
before returning.
This patch was originally written by Ramsay Jones (see commit
87f16258367a3b9a62663b11f898a4a6f3c19d31 in git.git).
|
|
3ec0f2e3
|
2016-03-31T11:30:31
|
|
xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bits
Commit 307ab20b3 ("xdiff: PATIENCE/HISTOGRAM are not independent option
bits", 19-02-2012) introduced the XDF_DIFF_ALG() macro to access the
flag bits used to represent the diff algorithm requested. In addition,
code which had used explicit manipulation of the flag bits was changed
to use the macros.
However, one example of direct manipulation remains. Update this code to
use the XDF_DIFF_ALG() macro.
This patch was originally written by Ramsay Jones (see commit
5cd6978a9cfef58de061a9525f3678ade479564d in git.git).
|
|
c86a65be
|
2016-03-21T21:10:26
|
|
config: don't special-case multivars that don't exist yet
This special-casing ignores that we might have a locked file, so the
hashtable does not represent the contents of the file we want to
write. This causes multivar writes to overwrite entries instead of add
to them when under lock.
There is no need for this as the normal code-path will write to the file
just fine, so simply get rid of it.
|
|
a1cf2644
|
2016-03-18T13:00:27
|
|
win32: free thread-local data on thread exit
|
|
e97d2d70
|
2016-03-17T10:45:22
|
|
commit: fix extraction of single-line signatures
The function to extract signatures suffers from a similar bug to the
header field finding one by having an unecessary line feed check as a
break condition of its loop.
Fix that and add a test for this single-line signature situation.
|
|
18c4ae70
|
2016-03-10T17:05:30
|
|
filebuf: handle write error in `lock_file`
When writing to a file with locking not check if writing the
locked file actually succeeds. Fix the issue by returning error
code and message when writing fails.
|
|
f17ed637
|
2016-03-10T16:42:55
|
|
blame: handle error when resoling HEAD in normalize_options
When normalizing options we try to look up HEAD's OID. While this
action may fail in malformed repositories we never check the
return value of the function.
Fix the issue by converting `normalize_options` to actually
return an error and handle the error in `git_blame_file`.
|
|
d8fcafb2
|
2016-03-16T19:05:11
|
|
Split the page size from the mmap alignment
While often similar, these are not the same on Windows. We want to use the page
size on Windows for the pools, but for mmap we need to use the allocation
granularity as the alignment.
On the other platforms these values remain the same.
|
|
9a668abd
|
2016-03-15T18:32:37
|
|
Option "LIBGIT2_PREFIX" to set the CMAKE's TARGET_PROPERTIES PREFIX
This is especially useful in combination with MinGW to yield the
Windows-compliant DLL name "git2.dll" instead of "libgit2.dll"
|
|
f587f38c
|
2016-03-15T18:20:32
|
|
CMake: do not overwrite but only append to CMAKE_C_FLAGS_DEBUG
This is useful to force "smart" IDEs (like CLIon) to use debug
flag -g even it may have decided that "-D_DEBUG" (which is
already present) is sufficient.
|
|
cdde081b
|
2016-03-14T12:41:41
|
|
Use general cl_git_fail because the error is generic
|
|
4e91020c
|
2016-03-14T12:41:12
|
|
Start error string with lower case character
|
|
c1ec732f
|
2016-03-14T12:02:00
|
|
Setup better defaults for OpenSSL ciphers
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
|
|
89e7604c
|
2016-03-10T17:21:02
|
|
config_cache: check return value of `git_config__lookup_entry`
Callers of `git_config__cvar` already handle the case where the
function returns an error due to a failed configuration variable
lookup, but we are actually swallowing errors when calling
`git_config__lookup_entry` inside of the function.
Fix this by returning early when `git_config__lookup_entry`
returns an error. As we call `git_config__lookup_entry` with
`no_errors == false` which leads us to call `get_entry` with
`GET_NO_MISSING` we will not return early when the lookup fails
due to a missing entry. Like this we are still able to set the
default value of the cvar and exit successfully.
|
|
dd78d7d1
|
2016-03-10T16:33:49
|
|
blame_git: handle error returned by `git_commit_parent`
|
|
8d3ee96a
|
2016-03-10T16:11:51
|
|
refdb_fs: fail if refcache returns NULL pointer
We usually check entries returned by `git_sortedcache_entry` for
NULL pointers. As we have a write lock in `packed_write`, though,
it really should not happen that the function returns NULL.
Assert that ref is not NULL to silence a Coverity warning.
|
|
0b357e2e
|
2016-03-02T01:50:34
|
|
coverity: report errors when uploading tarball
Curl by default does not report errors by setting the error code.
As the upload can fail through several conditions (e.g. the rate
limit, leading to unauthorized access) we should indicate this
information in Travis CI.
To improve upon the behavior, use `--write-out=%{http_code}` to
write out the HTTP code in addition to the received body and
return an error if the code does not equal 201.
|
|
851c51ab
|
2016-03-10T10:40:47
|
|
diff_tform: fix potential NULL pointer access
When the user passes in a diff which has no repository associated
we may call `git_config__get_int_force` with a NULL-pointer
configuration. Even though `git_config__get_int_force` is
designed to swallow errors, it is not intended to be called with
a NULL pointer configuration.
Fix the issue by only calling `git_config__get_int_force` only
when configuration could be retrieved from the repository.
|
|
d96c0638
|
2016-03-01T19:11:33
|
|
submodule: avoid passing NULL pointers to strncmp
In C89 it is undefined behavior to pass `NULL` pointers to
`strncmp` and later on in C99 it has been explicitly stated that
functions with an argument declared as `size_t nmemb` specifying
the array length shall always have valid parameters, no matter if
`nmemb` is 0 or not (see ISO 9899 §7.21.1.2).
The function `str_equal_no_trailing_slash` always passes its
parameters to `strncmp` if their lengths match. This means if one
parameter is `NULL` and the other one either `NULL` or a string
with length 0 we will pass the pointers to `strncmp` and cause
undefined behavior.
Fix this by explicitly handling the case when both lengths are 0.
|
|
1a16e8b0
|
2016-03-01T17:55:40
|
|
pack-objects: fix memory leak on overflow
|
|
e114bbac
|
2016-03-01T16:00:49
|
|
index: assert required OID are non-NULL
|
|
d0780b81
|
2016-03-01T15:35:45
|
|
object: avoid call of memset with ouf of bounds pointer
When computing a short OID we do this by first copying the
leading parts into the new OID structure and then setting the
trailing part to zero. In the case of the desired length being
`GIT_OID_HEXSZ - 1` we will call `memset` with an out of bounds
pointer and a length of 0. While this seems to cause no problems
for common platforms the C89 standard does not explicitly state
that calling `memset` with an out of bounds pointer and
length of 0 is valid.
Fix the potential issue by using the newly introduced
`git_oid__cpy_prefix` function.
|
|
fa4b93a6
|
2016-04-11T15:57:23
|
|
backport git_oid__cpy_prefix
|
|
faf823dc
|
2016-03-11T09:58:38
|
|
tests: transport: fix memory leaks with registering transports
|
|
0370dae1
|
2016-02-25T18:15:02
|
|
Check for __CLANG_INTTYPES_H
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.
|
|
e39ad747
|
2016-03-01T14:40:17
|
|
config_file: handle missing quotation marks in section header
When parsing a section header we expect something along the
format of '[section "subsection"]'. When a section is
mal-formated and is entirely missing its quotation marks we catch
this case by observing that `strchr(line, '"') - strrchr(line,
'"') = NULL - NULL = 0` and error out. Unfortunately, the error
message is misleading though, as we state that we are missing the
closing quotation mark while we in fact miss both quotation
marks.
Improve the error message by explicitly checking if the first
quotation mark could be found and, if not, stating that quotation
marks are completely missing.
|
|
ffb1f419
|
2016-03-01T14:24:09
|
|
describe: handle error code returned by git_pqueue_insert
|
|
4ebf745f
|
2016-03-09T11:16:16
|
|
mwindow: free unused windows if we fail to mmap
The first time may be due to memory fragmentation or just bad luck on a
32-bit system. When we hit the mmap error for the first time, free up
the unused windows and try again.
|
|
9ee498e8
|
2016-03-08T10:16:37
|
|
Only buffer if necessary.
|
|
eb09ead2
|
2016-03-04T01:18:30
|
|
odb: improved not found error messages
When looking up an abbreviated oid, show the actual (abbreviated) oid
the caller passed instead of a full (but ambiguously truncated) oid.
|
|
cdded630
|
2016-01-13T11:07:14
|
|
Remove duplicated calls to git_mwindow_close
|
|
e3862c9f
|
2016-01-11T17:09:32
|
|
Buffer sideband packet data
The inner packet may be split across multiple sideband packets.
|
|
8ec3d88f
|
2015-12-24T10:04:44
|
|
Avoid subtraction overflow in git_indexer_commit
|
|
4a93a7fc
|
2015-12-28T11:37:39
|
|
Tabs
|
|
b8dc15f7
|
2015-12-28T11:35:19
|
|
Adding test cases that actually test the functionality of the new transport
ssh, ssh+git and git+ssh should all successfully build an SSH transport
|
|
e44f6586
|
2015-12-28T07:43:24
|
|
Removing #define for SSH_PREFIX_COUNT and using ARRAY_SIZE instead
Also moving var declarations to top of blocks to support bad old compilers
|
|
429155d5
|
2015-12-28T07:40:15
|
|
Updating change to http_parser to reflect PR for nodejs/http-parser
The parser now also supports digits, '-' and '.'. https://github.com/nodejs/http-parser/pull/276
|
|
fa8b1a88
|
2015-12-22T10:56:38
|
|
Adding spec coverage for ssh+git and git+ssh protocols
|
|
ff8e3f0e
|
2015-12-22T10:38:31
|
|
Handle git+ssh:// and ssh+git:// protocols support
|
|
2f2575c0
|
2015-12-22T10:38:16
|
|
Updating http parser to accept a `+` in the schema
|
|
785d8c48
|
2016-03-04T13:50:23
|
|
Merge pull request #3653 from libgit2/cmn/treebuilder-submodule
treebuilder: don't try to verify submodules exist in the odb
|
|
ea5bf6bb
|
2016-03-04T12:34:38
|
|
treebuilder: don't try to verify submodules exist in the odb
Submodules don't exist in the objectdb and the code is making us try to
look for a blob with its commit id, which is obviously not going to
work.
Skip the test if the user wants to insert a submodule.
|
|
16099833
|
2016-03-03T22:57:45
|
|
Merge pull request #3651 from libgit2/cmn/init-libssh2
ssh: initialize libssh2
|
|
22f3d3aa
|
2016-03-03T22:26:31
|
|
ssh: initialize libssh2
We should have been doing this, but it initializes itself upon first
use, which works as long as nobody's doing concurrent network
operations. Initialize it on our init to make sure it's not getting
initialized concurrently.
|
|
839bdb05
|
2016-03-03T21:20:33
|
|
Merge pull request #3639 from srajko/threading-openssl-libssh2
Expand OpenSSL and libssh2 thread safety documentation
|
|
e23efa6d
|
2016-03-03T21:03:10
|
|
tests: take the version from our define
|
|
1e8255a3
|
2016-03-03T20:20:43
|
|
Bump version to 0.24.0
|
|
c21c8f67
|
2016-03-03T20:18:55
|
|
CHANGELOG: prepre tamplate for release
|
|
a7ef27af
|
2016-03-03T20:17:13
|
|
CHANGELOG: add note about WinHTTP cred handling
|
|
66a530eb
|
2016-03-03T20:11:18
|
|
Merge pull request #3648 from libgit2/cmn/auth-retry
test: make sure we retry the auth callback on all platforms
|
|
ba9bb664
|
2016-03-03T19:21:07
|
|
tests: create a ctest target for cred_callback
|
|
778fb695
|
2016-03-03T12:14:02
|
|
Merge pull request #3646 from pks-t/pks/xdiff-fix-from-upstream
xdiff: fix memleak on error case
|
|
a4cba9d4
|
2016-03-03T10:48:24
|
|
winhttp: retry authentication
If the caller has provided bad authentication, give them another
apportunity to get it right until they give up. This brings WinHTTP in
line with the other transports.
|
|
25205737
|
2016-03-03T10:08:00
|
|
test: make sure we retry the auth callback on all platforms
We were missing this test on Windows, which meant we didn't notice that
we never fixed the single authentication attempt it tries, nor its wrong
return code.
Enable this for the unix platforms as well over HTTP. We previously were
doing it locally but disabled it on OS X due to issues with its sshd not
accepting password authentication.
|
|
9b3fc895
|
2016-03-03T11:17:36
|
|
tests: plug a leak
|
|
edaffe22
|
2016-03-01T17:16:27
|
|
Merge pull request #3633 from ethomson/safe_creation
Stricter object dependency checking during creation
|
|
a4ea7faa
|
2016-03-01T08:54:00
|
|
xdiff: fix memleak on error case
Commit 3d1abc5afce fixes a memory leak in the xdiff code. In the
process of upstreaming the fix it was pointed out by Johannes
Schindelin that there is another memory leak present (see [1]).
Fix the second memory leak by applying the upstream fix to our
code base.
[1]: http://thread.gmane.org/gmane.comp.version-control.git/287034
|
|
dbee6835
|
2016-02-28T20:13:24
|
|
Merge pull request #3567 from sba1/few-p_getaddrinfo-fixes
Few p_getaddrinfo fixes
|
|
f2dddf52
|
2016-02-28T15:51:38
|
|
turn on strict object validation by default
|
|
4afe536b
|
2016-02-28T16:02:49
|
|
tests: use legitimate object ids
Use legitimate (existing) object IDs in tests so that we have the
ability to turn on strict object validation when running tests.
|
|
98c34149
|
2016-02-28T15:11:15
|
|
refs: honor strict object creation
|
|
3ef01e77
|
2016-02-28T14:37:37
|
|
git_object__is_valid: use `odb_read_header`
This allows lighter weight validation in `git_object__is_valid` that
does not require reading the entire object.
|
|
6ddf533a
|
2016-02-23T18:29:16
|
|
git_index_add: validate objects in index entries (optionally)
When `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION` is turned on, validate
the index entries given to `git_index_add`.
|
|
1a9d7c95
|
2016-02-28T19:43:45
|
|
Merge pull request #3644 from ethomson/debug_pool
travis ci: enable debug pool for valgrind builds
|
|
2bbc7d3e
|
2016-02-23T15:00:27
|
|
treebuilder: validate tree entries (optionally)
When `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION` is turned on, validate
the tree and parent ids given to treebuilder insertion.
|
|
ef63bab3
|
2016-02-23T13:34:35
|
|
git_commit: validate tree and parent ids
When `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION` is turned on, validate
the tree and parent ids given to commit creation functions.
|
|
7565dc65
|
2016-02-23T13:33:10
|
|
git_object__is_valid: simple object validity test
|
|
22a19f5b
|
2016-02-22T23:46:50
|
|
git_libgit2_opts: introduce `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION`
|
|
da033560
|
2016-02-28T11:34:36
|
|
travis ci: enable debug pool for valgrind builds
|
|
6cc4bac8
|
2016-02-28T11:31:10
|
|
Merge pull request #3577 from rossdylan/rossdylan/pooldebug
Add a new build flag to disable the pool allocator
|
|
09db7fd8
|
2016-02-25T15:19:51
|
|
Expand OpenSSL and libssh2 thread safety documentation
|
|
93e16642
|
2016-02-26T12:51:13
|
|
Fixed typo in one of the ifndef's in pool.h used to enable/disable debug mode
|
|
9f4e7c84
|
2016-02-25T18:42:09
|
|
Merge pull request #3638 from ethomson/nsec
USE_NSECS fixes
|
|
0d9a7498
|
2016-02-25T12:09:49
|
|
Merge pull request #3628 from pks-t/pks/coverity-fixes
Coverity fixes
|
|
fd129f28
|
2016-02-25T11:59:00
|
|
Merge pull request #3630 from libgit2/cmn/idx-extra-check
Extra checks for packfile indices
|
|
3d6a42d1
|
2016-02-25T11:23:19
|
|
nsec: support NDK's crazy nanoseconds
Android NDK does not have a `struct timespec` in its `struct stat`
for nanosecond support, instead it has a single nanosecond member inside
the struct stat itself. We will use that and use a macro to expand to
the `st_mtim` / `st_mtimespec` definition on other systems (much like
the existing `st_mtime` backcompat definition).
|
|
a4c55069
|
2016-02-25T11:31:18
|
|
nsec: update staging test for GIT_USE_NSECS
The index::nsec::staging_maintains_other_nanos test was created to
ensure that when we stage an entry when GIT_USE_NSECS is *unset* that
we truncate the index entry and do not persist the (old, invalid)
nanosec values. Ensure that when GIT_USE_NSECS is *set* that we do
not do that, and actually write the correct nanosecond values.
|
|
6d97beb9
|
2016-02-25T15:46:59
|
|
pack: don't allow a negative offset
|
|
ea9e00cb
|
2016-02-23T18:15:43
|
|
pack: make sure we don't go out of bounds for extended entries
A corrupt index might have data that tells us to go look past the end of
the file for data. Catch these cases and return an appropriate error
message.
|
|
9dfe1140
|
2016-02-25T09:08:23
|
|
Merge pull request #3637 from libgit2/cmn/conventions
CONVENTIONS: update to include general public API principles
|
|
1f8cb02f
|
2016-02-25T14:51:00
|
|
CONVENTIONS: update to include general public API principles
|