|
7175222c
|
2016-11-02T14:50:59
|
|
Merge pull request #3960 from ignatenkobrain/openssl-1.1.0
add support for OpenSSL 1.1.0 for BIO filter
|
|
3b832a08
|
2016-11-02T13:11:31
|
|
openssl: include OpenSSL headers only when we're buliding against it
We need to include the initialisation and construction functions in all
backend, so we include this header when building against SecureTransport
and WinHTTP as well.
|
|
d2451fed
|
2016-11-02T13:05:35
|
|
Merge pull request #3984 from pks-t/pks/pack-find-offset-race
pack: fix race in pack_entry_find_offset
|
|
2f3adf95
|
2016-11-02T12:35:46
|
|
openssl: use ASN1_STRING_get0_data when compiling against 1.1
For older versions we can fall back on the deprecated ASN1_STRING_data.
|
|
f15eedb3
|
2016-11-02T12:28:25
|
|
openssl: recreate the OpenSSL 1.1 BIO interface for older versions
We want to program against the interface, so recreate it when we compile
against pre-1.1 versions.
|
|
0cf15e39
|
2016-11-02T12:23:12
|
|
pack: fix race in pack_entry_find_offset
In `pack_entry_find_offset`, we try to find the offset of a
certain object in the pack file. To do so, we first assert if the
packfile has already been opened and open it if not. Opening the
packfile is guarded with a mutex, so concurrent access to this is
in fact safe.
What is not thread-safe though is our calculation of offsets
inside the packfile. Assume two threads calling
`pack_entry_find_offset` at the same time. We first calculate the
offset and index location and only then determine if the pack has
already been opened. If so, we re-calculate the offset and index
address.
Now the case for two threads: thread 1 first calculates the
addresses and is subsequently suspended. The second thread will
now call `pack_index_open` and initialize the pack file,
calculating its addresses correctly. When the first thread is
resumed now, he'll see that the pack file has already been
initialized and will happily proceed with the addresses it has
already calculated before the check. As the pack file was not
initialized before, these addresses are bogus.
Fix the issue by only calculating the addresses after having
checked if the pack file is open.
|
|
19001ca7
|
2016-11-02T09:23:53
|
|
Merge pull request #3976 from pks-t/pks/pqueue-null-deref
pqueue: resolve possible NULL pointer dereference
|
|
41ad9ebf
|
2016-11-01T09:59:17
|
|
Merge pull request #3975 from pks-t/pks/ci-improvements
CI Improvements
|
|
a051ee31
|
2016-10-31T16:02:43
|
|
Merge pull request #3978 from pks-t/pks/doc-improvements
Small documentation improvements
|
|
0334bf4b
|
2016-10-28T14:57:54
|
|
travis: do not allow valgrind failures
Our valgrind jobs haven't been failing for several builds by now.
This indicates that our tests are sufficiently stable when
running under valgrind. As such, any failures reported by
valgrind become interesting to us and shouldn't be ignored when
causing a build to fail.
Remove the valgrind job from the list of allowed failures.
|
|
18c18e3d
|
2016-10-31T15:55:46
|
|
coverity: check for Coverity token only if necessary
When running a Coverity build, we have to provide an
authentication token in order to proof that we are actually
allowed to run analysis in the name of a certain project. As this
token should be secret, it is only set on the main repository, so
when we were requested to run the Coverity script on another
repository we do error out. But in fact we do also error out if
the Coverity analysis should _not_ be run if there is no
authentication token provided.
Fix the issue by only checking for the authentication token after
determining if analysis is indeed requested.
|
|
dc98cb28
|
2016-10-31T13:50:23
|
|
openssl_stream: fix typo
|
|
59665db3
|
2016-10-31T13:50:13
|
|
PROJECTS: consistently quote directories
|
|
ea9ea6ac
|
2016-10-31T13:49:52
|
|
Documentation: fix small typos
|
|
95fa3880
|
2016-10-28T16:07:40
|
|
pqueue: resolve possible NULL pointer dereference
The `git_pqueue` struct allows being fixed in its total number of
entries. In this case, we simply throw away items that are
inserted into the priority queue by examining wether the new item
to be inserted has a higher priority than the previous smallest
one.
This feature somewhat contradicts our pqueue implementation in
that it is allowed to not have a comparison function. In fact, we
also fail to check if the comparison function is actually set in
the case where we add a new item into a fully filled fixed-size
pqueue.
As we cannot determine which item is the smallest item in absence
of a comparison function, we fix the `NULL` pointer dereference
by simply dropping all new items which are about to be inserted
into a full fixed-size pqueue.
|
|
561276ee
|
2016-10-28T14:48:30
|
|
coverity: only analyze the master branch of the main repository
We used to only execute Coverity analysis on the 'development'
branch before commit 998f001 (Refine build limitation,
2014-01-15), which refined Coverity build limitations. While we
do not really use the 'development' branch anymore, it does
still make sense to only analyze a single branch, as otherwise
Coverity might get confused.
Re-establish the restriction such that we only analyze libgit2's
'master' branch. Also fix the message announcing why we do not
actually analyze a certain build.
|
|
6c4d2d3e
|
2016-10-28T14:45:55
|
|
coverity: fix download URL
|
|
e3298a33
|
2016-10-28T12:30:39
|
|
Merge pull request #3973 from pks-t/pks/memleak-fixes
Trivial memory leak fixes in test suite
|
|
30a876cd
|
2016-10-27T11:29:15
|
|
tests: fetchhead: fix memory leak
|
|
61ad9bcd
|
2016-10-27T11:26:52
|
|
tests: vector: fix memory leak
|
|
67dd3140
|
2016-10-16T12:57:29
|
|
Merge pull request #3966 from vivaladav/documentation-fixes
patch: minor documentation fix.
|
|
6d8ecf08
|
2016-10-16T00:43:27
|
|
patch: minor documentation fix.
Fix @return description of git_patch_num_lines_in_hunk.
|
|
feb330d5
|
2016-10-12T12:41:36
|
|
add support for OpenSSL 1.1.0 for BIO filter
Closes: https://github.com/libgit2/libgit2/issues/3959
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
dcd759b8
|
2016-10-10T09:25:49
|
|
Merge pull request #3897 from pks-t/pks/squelch-example-warnings
Squelch example warnings, enable CI
|
|
29d9afc0
|
2016-08-16T10:06:17
|
|
examples: general: extract function demonstrating ODB
|
|
ec3f5a9c
|
2016-08-16T11:02:47
|
|
script: cibuild: build examples
|
|
fc293919
|
2016-08-16T11:43:10
|
|
examples: add: fix type casting warning
|
|
5c2a8361
|
2016-08-16T11:01:09
|
|
examples: diff: parse correct types for line-diffopts
|
|
7314da10
|
2016-08-16T10:55:28
|
|
examples: fix warnings in network/fetch.c
|
|
e2d1b7ec
|
2016-08-16T10:46:35
|
|
examples: general: fix remaining warnings
|
|
662eee15
|
2016-08-16T10:09:52
|
|
examples: general: convert C99 comments to C90 comments
|
|
c313e3d9
|
2016-09-01T12:44:08
|
|
examples: general: extract function demonstrating OID parsing
|
|
b009adad
|
2016-08-16T09:59:28
|
|
examples: general: extract function demonstrating commit writing
|
|
15960454
|
2016-08-16T09:36:31
|
|
examples: general: extract functions demonstrating object parsing
|
|
8b93ccdf
|
2016-08-16T09:35:08
|
|
examples: general: extract function demonstrating revwalking
|
|
c079e3c8
|
2016-08-16T09:32:15
|
|
examples: general: extract function demonstrating index walking
|
|
f9a7973d
|
2016-08-16T09:29:14
|
|
examples: general: extract function demonstrating reference listings
|
|
986913f4
|
2016-08-16T09:25:06
|
|
examples: general: extract function demonstrating config files
|
|
176d58ba
|
2016-08-16T09:17:12
|
|
examples: general: use tabs instead of spaces
|
|
610cff13
|
2016-10-09T16:05:48
|
|
Merge branch 'pr/3809'
|
|
dc5cfdba
|
2016-06-02T23:18:31
|
|
make git_diff_stats_to_buf not show 0 insertions or 0 deletions
|
|
2468bf06
|
2016-10-09T15:45:20
|
|
Merge pull request #3958 from libgit2/ethomson/settings_docs
docs: GIT_OPT_ENABLE_STRICT_OBJECT_CREATION is enabled
|
|
aae89534
|
2016-10-09T12:51:48
|
|
Merge pull request #3956 from pks-t/pks/object-parsing-hardening
Object parsing hardening
|
|
a719ef5e
|
2016-10-07T09:31:41
|
|
commit: always initialize commit message
When parsing a commit, we will treat all bytes left after parsing
the headers as the commit message. When no bytes are left, we
leave the commit's message uninitialized. While uncommon to have
a commit without message, this is the right behavior as Git
unfortunately allows for empty commit messages.
Given that this scenario is so uncommon, most programs acting on
the commit message will never check if the message is actually
set, which may lead to errors. To work around the error and not
lay the burden of checking for empty commit messages to the
developer, initialize the commit message with an empty string
when no commit message is given.
|
|
93392cdd
|
2016-10-09T11:27:56
|
|
docs: GIT_OPT_ENABLE_STRICT_OBJECT_CREATION is enabled
We changed the defaults on strict object creation - it is enabled by
default. Update the documentation to reflect that.
|
|
a7df4a91
|
2016-10-07T22:36:21
|
|
Merge pull request #3955 from arthurschreiber/arthur/fix-regcomp_l-check
Fix the existence check for `regcomp_l`.
|
|
36117978
|
2016-10-06T18:30:30
|
|
Fix the existence check for `regcomp_l`.
`xlocale.h` only defines `regcomp_l` if `regex.h` was included as well.
Also change the test cases to actually test `p_regcomp` works with
a multibyte locale.
|
|
45dc219f
|
2016-10-07T16:01:28
|
|
Merge pull request #3921 from libgit2/cmn/walk-limit-enough
Improve revision walk preparation logic
|
|
4974e3a5
|
2016-10-07T09:18:55
|
|
tree: validate filename and OID length when parsing object
When parsing tree entries from raw object data, we do not verify
that the tree entry actually has a filename as well as a valid
object ID. Fix this by asserting that the filename length is
non-zero as well as asserting that there are at least
`GIT_OID_RAWSZ` bytes left when parsing the OID.
|
|
fedc05c8
|
2016-10-06T18:13:34
|
|
revwalk: don't show commits that become uninteresting after being enqueued
When we read from the list which `limit_list()` gives us, we need to check that
the commit is still interesting, as it might have become uninteresting after it
was added to the list.
|
|
d11fcf86
|
2016-10-06T14:57:11
|
|
Merge pull request #3953 from arthurschreiber/arthur/fix-regcomp-locale-issues
Make sure we use the `C` locale for `regcomp` on macOS.
|
|
ab96ca55
|
2016-10-06T13:15:31
|
|
Make sure we use the `C` locale for `regcomp` on macOS.
|
|
565fb8dc
|
2016-06-25T20:02:45
|
|
revwalk: introduce tests that hide old commits
Introduce some tests that show some commits, while hiding some commits
that have a timestamp older than the common ancestors of these two
commits.
|
|
3cc5ec94
|
2016-10-05T12:57:53
|
|
rebase: don't ask for time sorting
`git-rebase--merge` does not ask for time sorting, but uses the default. We now
produce the same default time-ordered output as git, so make us of that since
it's not always the same output as our time sorting.
|
|
82d4c0e6
|
2016-10-05T12:55:53
|
|
revwalk: update the description for the default sorting
It changed from implementation-defined to git's default sorting, as there are
systems (e.g. rebase) which depend on this order. Also specify more explicitly
how you can get git's "date-order".
|
|
ea1ceb7f
|
2016-10-05T12:23:26
|
|
revwalk: remove a useless enqueueing phase for topological and default sorting
After `limit_list()` we already have the list in time-sorted order, which is
what we want in the "default" case. Enqueueing into the "unsorted" list would
just reverse it, and the topological sort will do its own sorting if it needs
to.
|
|
4aed1b9a
|
2016-09-29T15:05:38
|
|
Add revwalk note to CHANGELOG
|
|
9db367bf
|
2016-09-27T16:14:42
|
|
revwalk: get rid of obsolete marking code
We've now moved to code that's closer to git and produces the output
during the preparation phase, so we no longer process the commits as
part of generating the output.
This makes a chunk of code redundant, as we're simply short-circuiting
it by detecting we've processed the commits alrady.
|
|
e93b7e32
|
2016-09-27T13:35:48
|
|
revwalk: style change
Change the condition for returning 0 more in line with that we write
elsewhere in the library.
|
|
5e2a29a7
|
2016-09-27T13:11:47
|
|
commit_list: fix the date comparison function
This returns the integer-cast truth value comparing the dates. What we
want instead of a (-1, 0, 1) output depending on how they compare.
|
|
48c64362
|
2016-09-27T11:59:24
|
|
revwalk: port over the topological sorting
After porting over the commit hiding and selection we were still left
with mistmaching output due to the topologial sort.
This ports the topological sorting code to make us match with our
equivalent of `--date-order` and `--topo-order` against the output
from `rev-list`.
|
|
938f8e32
|
2016-09-23T13:25:35
|
|
pqueue: support not having a comparison function
In this case, we simply behave like a vector.
|
|
0bd43371
|
2016-09-23T12:42:33
|
|
vector, pqueue: add git_vector_reverse and git_pqueue_reverse
This is a convenience function to reverse the contents of a vector and a pqueue
in-place.
The pqueue function is useful in the case where we're treating it as a
LIFO queue.
|
|
6708618c
|
2016-07-21T01:24:12
|
|
revwalk: get closer to git
We had some home-grown logic to figure out which objects to show during
the revision walk, but it was rather inefficient, looking over the same
list multiple times to figure out when we had run out of interesting
commits. We now use the lists in a smarter way.
We also introduce the slop mechanism to determine when to stpo
looking. When we run out of interesting objects, we continue preparing
the walk for another 5 rounds in order to make it less likely that we
miss objects in situations with complex graphs.
|
|
e8ab13b3
|
2016-10-05T23:46:02
|
|
Merge pull request #3954 from libgit2/cmn/osx-ssh-key
Travis Mac SSH key issues
|
|
db357667
|
2016-10-05T20:17:06
|
|
travis: take the newer ssh-keygen format into account
The Mac machines have updated their SSH version and so the ssh-keygen
format has changed. Ask it for MD5, which is the one that is output as
hex.
|
|
94d565b9
|
2016-10-05T18:52:43
|
|
cibuild: set -x
This lets us see the details of what we're doing instead of just seeing the
output of unknown commands in the build output.
|
|
9fbbb0ee
|
2016-10-01T19:32:16
|
|
Merge pull request #3931 from libgit2/ethomson/checkout_dont_calculate_oid_for_dirs
checkout: don't try to calculate oid for directories
|
|
955c99c2
|
2016-09-14T10:28:24
|
|
checkout: don't try to calculate oid for directories
When trying to determine if we can safely overwrite an existing workdir
item, we may need to calculate the oid for the workdir item to determine
if its identical to the old side (and eligible for removal).
We previously did this regardless of the type of entry in the workdir;
if it was a directory, we would open(2) it and then try to read(2).
The read(2) of a directory fails on many platforms, so we would treat it
as if it were unmodified and continue to perform the checkout.
On FreeBSD, you _can_ read(2) a directory, so this pattern failed. We
would calculate an oid from the data read and determine that the
directory was modified and would therefore generate a checkout conflict.
This reliance on read(2) is silly (and was most likely accidentally
giving us the behavior we wanted), we should be explicit about the
directory test.
|
|
89c332e4
|
2016-09-13T16:16:20
|
|
Merge pull request #3929 from libgit2/vmg/time
time: Export `git_time_monotonic`
|
|
2749ff46
|
2016-09-13T15:52:43
|
|
time: Export `git_time_monotonic`
|
|
bba704ad
|
2016-09-09T08:45:33
|
|
Merge pull request #3925 from pks-t/pks/cmake-library-dirs
cmake: add curl library path
|
|
9ad07fc0
|
2016-09-06T10:43:21
|
|
Merge pull request #3923 from libgit2/ethomson/diff-read-empty-binary
Read binary patches (with no binary data)
|
|
46035d98
|
2016-09-06T11:21:29
|
|
Merge pull request #3882 from pks-t/pks/fix-fetch-refspec-dst-parsing
refspec: do not set empty rhs for fetch refspecs
|
|
adedac5a
|
2016-09-02T02:03:45
|
|
diff: treat binary patches with no data special
When creating and printing diffs, deal with binary deltas that have
binary data specially, versus diffs that have a binary file but lack the
actual binary data.
|
|
528b2f7d
|
2016-09-05T13:24:07
|
|
cmake: add curl library path
The `PKG_CHECK_MODULES` function searches a pkg-config module and
then proceeds to set various variables containing information on
how to link to the library. In contrast to the `FIND_PACKAGE`
function, the library path set by `PKG_CHECK_MODULES` will not
necessarily contain linking instructions with a complete path to
the library, though. So when a library is not installed in a
standard location, the linker might later fail due to being
unable to locate it.
While we already honor this when configuring libssh2 by adding
`LIBSSH2_LIBRARY_DIRS` to the link directories, we fail to do so
for libcurl, preventing us to build libgit2 on e.g. FreeBSD. Fix
the issue by adding the curl library directory to the linker
search path.
|
|
f4e3dae7
|
2016-09-02T11:26:16
|
|
diff_print: change test for skipping binary printing
Instead of skipping printing a binary diff when there is no data, skip
printing when we have a status of `UNMODIFIED`. This is more in-line
with our internal data model and allows us to expand the notion of
binary data.
In the future, there may have no data because the files were unmodified
(there was no data to produce) or it may have no data because there was
no data given to us in a patch. We want to treat these cases
separately.
|
|
4bfd7c63
|
2016-09-01T16:55:27
|
|
patch: error on diff callback failure
|
|
ce54e77c
|
2016-09-02T08:50:08
|
|
Merge pull request #3922 from pks-t/pks/diff-only-load-binaries-when-requested
patch_generate: only calculate binary diffs if requested
|
|
4b34f687
|
2016-09-01T15:14:25
|
|
patch_generate: only calculate binary diffs if requested
When generating diffs for binary files, we load and decompress
the blobs in order to generate the actual diff, which can be very
costly. While we cannot avoid this for the case when we are
called with the `GIT_DIFF_SHOW_BINARY` flag, we do not have to
load the blobs in the case where this flag is not set, as the
caller is expected to have no interest in the actual content of
binary files.
Fix the issue by only generating a binary diff when the caller is
actually interested in the diff. As libgit2 uses heuristics to
determine that a blob contains binary data by inspecting its size
without loading from the ODB, this saves us quite some time when
diffing in a repository with binary files.
|
|
40b08124
|
2016-08-30T12:11:02
|
|
Merge pull request #3915 from pks-t/pks/index-collision-test-leak
tests: index: do not re-allocate index
|
|
a08e8825
|
2016-08-30T08:22:17
|
|
Merge pull request #3907 from steffhip/git_checkout_tree-fix
|
|
88cfe614
|
2016-08-24T01:20:39
|
|
git_checkout_tree options fix
According to the reference the git_checkout_tree and git_checkout_head
functions should accept NULL in the opts field
This was broken since the opts field was dereferenced and thus lead to a
crash.
|
|
dfd79576
|
2016-08-29T09:39:03
|
|
Merge pull request #3914 from pks-t/pks/libqgit2-binding-url
README: adjust URL to libqgit2 repository
|
|
86e88534
|
2016-08-29T13:09:58
|
|
tests: index: do not re-allocate index
Plug a memory leak caused by re-allocating a `git_index`
structure which has already been allocated by the test suite's
initializer.
|
|
8044ee42
|
2016-08-29T09:38:20
|
|
README: adjust URL to libqgit2 repository
|
|
ace0d36b
|
2016-08-29T09:29:34
|
|
Merge pull request #3900 from pks-t/pks/http-close-substream-on-connect
transports: http: set substream as disconnected after closing
|
|
5671e81f
|
2016-08-26T10:09:12
|
|
Merge pull request #3908 from libgit2/ethomson/patch_from_diff
Teach `git_patch_from_diff` about parsed diffs
|
|
b859faa6
|
2016-08-23T23:38:39
|
|
Teach `git_patch_from_diff` about parsed diffs
Ensure that `git_patch_from_diff` can return the patch for parsed diffs,
not just generate a patch for a generated diff.
|
|
c60210d3
|
2016-08-24T08:28:49
|
|
Merge pull request #3904 from stinb/filesystem-iterator-double-free
filesystem_iterator: fixed double free on error
|
|
7a3f1de5
|
2016-08-22T09:27:47
|
|
filesystem_iterator: fixed double free on error
|
|
c1b370e9
|
2016-08-17T09:24:44
|
|
Merge pull request #3837 from novalis/dturner/indexv4
Support index v4
|
|
635a9222
|
2016-08-17T08:54:48
|
|
Merge pull request #3895 from pks-t/pks/negate-basename-in-subdirs
ignore: allow unignoring basenames in subdirectories
|
|
b1453601
|
2016-08-17T11:38:26
|
|
transports: http: reset `connected` flag when closing transport
|
|
c4cba4e9
|
2016-08-17T11:00:05
|
|
transports: http: reset `connected` flag when re-connecting transport
When calling `http_connect` on a subtransport whose stream is already
connected, we first close the stream in case no keep-alive is in use.
When doing so, we do not reset the transport's connection state,
though. Usually, this will do no harm in case the subsequent connect
will succeed. But when the connection fails we are left with a
substransport which is tagged as connected but which has no valid
stream attached.
Fix the issue by resetting the subtransport's connected-state when
closing its stream in `http_connect`.
|
|
fcb2c1c8
|
2016-08-12T09:06:15
|
|
ignore: allow unignoring basenames in subdirectories
The .gitignore file allows for patterns which unignore previous
ignore patterns. When unignoring a previous pattern, there are
basically three cases how this is matched when no globbing is
used:
1. when a previous file has been ignored, it can be unignored by
using its exact name, e.g.
foo/bar
!foo/bar
2. when a file in a subdirectory has been ignored, it can be
unignored by using its basename, e.g.
foo/bar
!bar
3. when all files with a basename are ignored, a specific file
can be unignored again by specifying its path in a
subdirectory, e.g.
bar
!foo/bar
The first problem in libgit2 is that we did not correctly treat
the second case. While we verified that the negative pattern
matches the tail of the positive one, we did not verify if it
only matches the basename of the positive pattern. So e.g. we
would have also negated a pattern like
foo/fruz_bar
!bar
Furthermore, we did not check for the third case, where a
basename is being unignored in a certain subdirectory again.
Both issues are fixed with this commit.
|
|
5625d86b
|
2016-05-17T15:40:32
|
|
index: support index v4
Support reading and writing index v4. Index v4 uses a very simple
compression scheme for pathnames, but is otherwise similar to index v3.
Signed-off-by: David Turner <dturner@twitter.com>
|
|
aeb5ee5a
|
2016-05-17T15:40:46
|
|
varint: Add varint encoding/decoding
This code is ported from git.git
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: David Turner <dturner@twopensource.com>
|
|
26a8617d
|
2016-08-09T14:34:55
|
|
Merge pull request #3891 from pks-t/pks/stransport-memory-management-improvements
stransport memory management improvements
|
|
5961face
|
2016-08-09T08:07:10
|
|
Merge pull request #3893 from pks-t/pks/remove-unused-test-cb
tests: blob: remove unused callback function
|