|
43667e57
|
2020-06-06T17:39:58
|
|
Update main.yml
|
|
560ca69a
|
2020-06-06T17:30:48
|
|
Update main.yml
|
|
41e18bd4
|
2020-06-06T17:28:06
|
|
Update main.yml
|
|
69b6027c
|
2020-06-06T17:26:58
|
|
Update main.yml
|
|
5a5335f4
|
2020-06-06T17:25:52
|
|
Update main.yml
|
|
a1b454e0
|
2020-06-06T17:24:32
|
|
Update main.yml
|
|
4a8f9f77
|
2020-06-06T17:22:57
|
|
Update main.yml
|
|
94017145
|
2020-06-06T17:20:23
|
|
Update main.yml
|
|
6c8ad0f8
|
2020-06-06T17:16:10
|
|
Update main.yml
|
|
6527b35e
|
2020-06-06T16:38:55
|
|
Update main.yml
|
|
309b6148
|
2020-06-06T16:38:01
|
|
Update main.yml
|
|
0a8fa2a5
|
2020-06-06T16:34:08
|
|
Update main.yml
|
|
0a4255e4
|
2020-06-06T16:30:27
|
|
Update main.yml
|
|
06e0abe1
|
2020-06-06T16:22:25
|
|
Update main.yml
|
|
fd6997af
|
2020-06-06T16:21:07
|
|
Update main.yml
|
|
91f02a8a
|
2020-06-06T16:20:35
|
|
Update main.yml
|
|
8d8cfee9
|
2020-06-06T16:16:30
|
|
Update main.yml
|
|
39d12f1c
|
2020-06-06T16:14:59
|
|
Update main.yml
|
|
872cc3dc
|
2020-06-06T16:13:38
|
|
Update main.yml
|
|
eb7e17ee
|
2020-06-06T16:12:18
|
|
Update main.yml
|
|
aa0b1d19
|
2020-06-06T16:08:00
|
|
Update main.yml
|
|
254108b0
|
2020-06-06T15:53:42
|
|
Update main.yml
|
|
cef3585b
|
2020-06-06T15:48:00
|
|
Update main.yml
|
|
e300547b
|
2020-06-06T15:37:42
|
|
Update main.yml
|
|
580c76ed
|
2020-06-06T15:35:58
|
|
Update main.yml
|
|
3b6fad6d
|
2020-06-06T15:33:19
|
|
Update main.yml
|
|
15fa1a49
|
2020-06-06T15:14:21
|
|
Update main.yml
|
|
340de10f
|
2020-06-06T15:03:21
|
|
Update main.yml
|
|
cdeff885
|
2020-06-06T14:53:07
|
|
Update main.yml
|
|
10d5987c
|
2020-06-06T14:45:07
|
|
Create main.yml
|
|
c708e5e5
|
2020-06-05T14:11:34
|
|
Merge pull request #5541 from libgit2/ethomson/clar_tap
clar: add tap output option
|
|
cad7a1ba
|
2020-06-05T08:42:38
|
|
clar: include the function name
|
|
b4290518
|
2020-06-05T07:53:32
|
|
Merge pull request #5545 from libgit2/ethomson/diff_parse
diff::parse: don't include `diff.h`
|
|
06d69dfc
|
2020-05-01T12:39:48
|
|
diff::parse: don't include `diff.h`
We don't call any internal functions in the test; we don't need to
include `../src/diff.h`.
|
|
2f8d0cf2
|
2020-06-04T12:37:48
|
|
Merge pull request #5543 from libgit2/ethomson/release_script_typo
release script: fix typo
|
|
b79f7d38
|
2020-06-04T09:49:38
|
|
release script: fix typo
|
|
f7250cc3
|
2020-06-04T07:23:15
|
|
clar: add tap output
|
|
691315e6
|
2020-06-03T15:47:42
|
|
clar: add an output abstraction layer
Add an output abstraction layer, with a single output format, "clap",
the clar protocol, which is the current output format for clar.
|
|
0187f36a
|
2020-06-03T15:22:44
|
|
clar: parse arguments before printing the header
We want to parse arguments before we start printing any output; the
arguments themselves may impact the way we display that output.
|
|
86b85492
|
2020-06-03T15:40:37
|
|
Merge pull request #5537 from libgit2/ethomson/clar_exactmatch
tests: offer exact name matching with a `$` suffix
|
|
107bf1f4
|
2020-06-03T11:47:13
|
|
clar: print indirection
|
|
53a8f463
|
2020-06-03T07:40:59
|
|
Merge pull request #5536 from libgit2/ethomson/http
httpclient: support googlesource
|
|
6de8aa7f
|
2020-06-02T12:21:22
|
|
Merge pull request #5532 from joshtriplett/pack-default-path
git_packbuilder_write: Allow setting path to NULL to use the default path
|
|
22f9a0fc
|
2020-06-02T12:12:41
|
|
Merge pull request #5531 from joshtriplett/mempack-threads
mempack: Use threads when building the pack
|
|
0d3ce2ac
|
2020-06-02T10:23:41
|
|
offer exact name matching with a `$` suffix
When using `-s` to specify a particular test, it will do a prefix match.
Thus, `-sapply::both::rename_a_to_b_to_c` will match both a test named
`test_apply_both__rename_a_to_b_to_c` and a test that begins with that
name, like `test_apply_both__rename_a_to_b_to_c_exact`.
Permit a trailing `$` to `-s` syntax. This allows a user to specify
`-sapply::both::rename_a_to_b_to_c$` to match _only_ the
`test_apply_both__rename_a_to_b_to_c` function.
We already filter to ensure that the given prefix matches the current
test name. Also ensure that the length of the test name matches the
length of the filter, sans trailing `$`.
|
|
d4b953f8
|
2020-06-02T09:26:11
|
|
Merge pull request #5528 from libgit2/ethomson/clar_internal
clar: use internal functions instead of /bin/cp and /bin/rm
|
|
2a2c5b40
|
2020-05-23T15:57:48
|
|
clar: remove unused shell_out function
|
|
ee9e9163
|
2020-05-23T15:56:29
|
|
clar: remove files internally instead of /bin/rm
Similar to how clar has used `/bin/cp` to copy files, it's used
`/bin/rm` to remove them. This has similar deficiencies; meaning that
leaks is noisy and it's slow. Move it to an internal function.
|
|
d03fd331
|
2020-05-23T15:42:51
|
|
clar: copy files with sendfile on linux
|
|
8df4f519
|
2020-05-23T15:04:54
|
|
clar: copy files internally instead of /bin/cp
clar has historically shelled out to `/bin/cp` to copy test fixtures
into a sandbox. This has two deficiencies:
1. It's slower than simply opening the source and destination and
copying them in a read/write loop. On my Mac, the `/bin/cp` based
approach takes ~2:40 for a full test pass. Using a read/write loop
to copy the files ourselves takes ~1:50.
2. It's noisy. Since the leak detector follows fork/exec, we'll end up
running the leak detector on `/bin/cp`. This would be fine, except
that the leak detector spams the console on startup and shutdown, so
it adds a _lot_ of additional information to the test runs that is
useless. By not forking and using this internal system, we see much
less output.
|
|
849f371e
|
2020-06-02T00:29:34
|
|
Merge pull request #5535 from libgit2/ethomson/strarray
strarray refactoring
|
|
04c7bdb4
|
2020-06-01T22:44:14
|
|
httpclient: clear the read_buf on new requests
The httpclient implementation keeps a `read_buf` that holds the data
in the body of the response after the headers have been written. We
store that data for subsequent calls to `git_http_client_read_body`. If
we want to stop reading body data and send another request, we need to
clear that cached data.
Clear the cached body data on new requests, just like we read any
outstanding data from the socket.
|
|
aa8b2c0f
|
2020-06-01T23:53:55
|
|
httpclient: don't read more than the client wants
When `git_http_client_read_body` is invoked, it provides the size of the
buffer that can be read into. This will be set as the parser context's
`output_size` member. Use this as an upper limit on our reads, and
ensure that we do not read more than the client requests.
|
|
5eb48a14
|
2020-05-29T13:17:39
|
|
strarray: deprecate git_strarray_copy
We should not be in the business of copying strings around for users.
We either return a strarray that can be freed, or we take one (and do
not mutate it).
|
|
51eff5a5
|
2020-05-29T13:13:19
|
|
strarray: we should `dispose` instead of `free`
We _dispose_ the contents of objects; we _free_ objects (and their
contents). Update `git_strarray_free` to be `git_strarray_dispose`.
`git_strarray_free` remains as a deprecated proxy function.
|
|
a9746b30
|
2020-05-29T11:21:55
|
|
strarray: move to its own file
|
|
570f0340
|
2020-06-01T19:10:38
|
|
httpclient: read_body should return 0 at EOF
When users call `git_http_client_read_body`, it should return 0 at the
end of a message. When the `on_message_complete` callback is called,
this will set `client->state` to `DONE`. In our read loop, we look for
this condition and exit.
Without this, when there is no data left except the end of message chunk
(`0\r\n`) in the http stream, we would block by reading the three bytes
off the stream but not making progress in any `on_body` callbacks.
Listening to the `on_message_complete` callback allows us to stop trying
to read from the socket when we've read the end of message chunk.
|
|
b7bdb071
|
2020-05-30T15:21:48
|
|
online::clone: test a googlesource URL
Google Git (googlesource.com) behaves differently than git proper.
Test that we can communicate with it.
|
|
629515a8
|
2020-06-01T15:06:29
|
|
Merge pull request #5481 from pks-t/pks/cmake-cleanups
CMake cleanups
|
|
17641f1f
|
2020-06-01T15:05:51
|
|
Merge pull request #5526 from libgit2/ethomson/poolinit
git_pool_init: allow the function to fail
|
|
0f35efeb
|
2020-05-23T10:15:51
|
|
git_pool_init: handle failure cases
Propagate failures caused by pool initialization errors.
|
|
2e7d4579
|
2020-04-03T19:59:39
|
|
cmake: remove option to add profiling flags
We currently have an option that adds options for profiling to both our
CFLAGS and LDFLAGS. Having such flags behind various build options is
not really sensible at all, since users should instead set up those
flags via environment variables supported by CMake itself.
Let's remove this option.
|
|
2551b1b0
|
2020-04-03T19:53:35
|
|
cmake: remove support for creating tags
We currently have support for generating tags via ctags as part of our
build system. We aren't really in the place of supporting any tooling
that exists apart from the actual build environment, as doing so adds
additional complexity and maintenance burden to our build instructions.
This is in fact nicely demonstrated by this particular option, as it
hasn't been working anymore since commit e5c9723d0 (cmake: move library
build instructions into subdirectory, 2017-06-30).
As a result, this commit removes support for building CTags
|
|
bc02bcd9
|
2020-04-03T19:51:22
|
|
cmake: move modules into the "cmake/" top level dir
Our custom CMake module currently live in "cmake/Modules". As the
"cmake/" directory doesn't contain anything except the "Modules"
directory, it doesn't really make sense to have the additional
intermediate directory. So let's instead move the modules one level up
into the "cmake/" top level directory.
|
|
511fb9e6
|
2020-04-03T22:53:23
|
|
cmake: always disable deprecation-sync warnings
We currently disable deprecation synchronization warnings in case we're
building with Clang. We check for Clang by doing a string comparison on
the compiler identification, but this seems to have been broken by an
update in macOS' image as the compiler ID has changed to "AppleClang".
Let's just unconditionally disable this warning on Unix platforms. We
never add the deprecated attribute anyway, so the warning doesn't help
us at all.
|
|
3956679c
|
2020-04-03T20:08:02
|
|
cmake: remove policies
The `CMAKE_MINIUM_REQUIRE()` function not only sets up the minimum
required CMake version of a project, but it will also at the same time
set the CMake policy version. In effect this means that all policies
that have been introduced before the minimum CMake version will be
enabled automatically.
When updating our minimum required version ebabb88f2 (cmake: update
minimum CMake version to v3.5.1, 2019-10-10), we didn't remove any of
the policies we've been manually enabling. The newest CMake policy we've
been enabling is CMP0054, which was introduced back in CMake v3.1. As a
result, we can now just remove all manual calls to `CMAKE_POLICY()`.
|
|
172a2886
|
2020-06-01T14:04:15
|
|
Merge pull request #5529 from libgit2/ethomson/difftest
diff::workdir: actually test the buffers
|
|
1bbdf15d
|
2020-06-01T13:57:12
|
|
Merge pull request #5527 from libgit2/ethomson/config_unreadable
Handle unreadable configuration files
|
|
9df69223
|
2020-05-23T11:42:19
|
|
config: test that unreadable files are treated as notfound
|
|
d1409f48
|
2020-05-06T19:57:07
|
|
config: ignore unreadable configuration files
Modified `config_file_open()` so it returns 0 if the config file is
not readable, which happens on global config files under macOS
sandboxing (note that for some reason `access(F_OK)` DOES work with
sandboxing, but it is lying). Without this read check sandboxed
applications on macOS can not open any repository, because
`config_file_read()` will return GIT_ERROR when it cannot read the
global /Users/username/.gitconfig file, and the upper layers will
just completely abort on GIT_ERROR when attempting to load the
global config file, so no repositories can be opened.
|
|
89ddd0fc
|
2020-06-01T13:19:01
|
|
Merge pull request #5533 from pjw91/fix-index-write
Make git_index_write() generate valid v4 index
|
|
1a899008
|
2020-05-26T20:36:13
|
|
tests: index::version: write v4 index: re-open repo to read written v4 index
The `git_index_free()` merely decrement the reference counter from 2 to
1, and does not "free" the index.
Thus, the following `git_repository_index()` merely increase the counter
to 2, instead of read index from disk.
The written index is not read and parsed, which makes this test case
effectively becomes a no-op.
|
|
8c96d56d
|
2020-05-26T04:53:09
|
|
index: write v4: bugfix: prefix path with strip_len, not same_len
According to index-format.txt of git, the path of an entry is prefixed
with N, where N indicates the length of bytes to be stripped.
|
|
5278a006
|
2020-05-23T16:07:54
|
|
git_packbuilder_write: Allow setting path to NULL to use the default path
If given a NULL path, write to the object path of the repository.
Add tests for the new behavior.
|
|
0bc091dd
|
2020-05-23T15:35:38
|
|
git_packbuilder_write: Unify cleanup path
Clean up and return via a single label, to avoid duplicate error
handling before each return, and to make it easier to extend the set of
cleanups needed.
|
|
30285a3c
|
2020-05-23T15:04:19
|
|
mempack: Use threads when building the pack
The mempack ODB backend creates a packbuilder internally to write out a
pack; call git_packbuilder_set_threads on that packbuilder, to use
threads for packing if available.
|
|
3414d470
|
2020-05-23T16:27:56
|
|
diff::workdir: actually test the buffers
The static test data is erroneously initialized with a length of 0 for
three of the strings. This means the tests are not actually examining
those strings. Provide the length.
|
|
27cb4e0e
|
2020-05-23T11:02:07
|
|
Merge pull request #5522 from pks-t/pks/openssl-cert-memleak
OpenSSL certificate memory leak
|
|
abfdb8a6
|
2020-05-23T10:15:37
|
|
git_pool_init: return an int
Let `git_pool_init` return an int so that it could fail.
|
|
e4bdba56
|
2020-05-23T09:57:22
|
|
Merge pull request #5515 from pks-t/pks/flaky-checkout-test
tests: checkout: fix flaky test due to mtime race
|
|
3b7b4d27
|
2020-05-23T09:40:55
|
|
Merge pull request #5523 from libgit2/pks/cmake-sort-reproducible-builds
cmake: Sort source files for reproducible builds
|
|
f88e12db
|
2020-05-23T09:35:53
|
|
checkout::index: free the index
|
|
3f201f75
|
2020-05-16T13:48:04
|
|
checkout: fix file being treated as unmodified due to racy index
When trying to determine whether a file changed, we try to avoid heavy
operations by fist taking a look at the index, seeing whether the index
entry is modified already. This doesn't seem to cut it, though, as we
currently have the racy checkout::index::can_disable_pathspec_match test
case: sometimes the files get restored to their original contents,
sometimes they aren't.
The issue is caused by a racy index [1]: in case we modify a file, add
it to the index and then modify it again in-place without changing its
file, then we may end up with a modified file that has the same stat(3P)
info as we've currently got it in its corresponding index entry. The
mitigation for this is to treat files with the same mtime as the index
are treated as racily modified. We already have this logic in place for
the index, but not when doing a checkout.
Fix the issue by only consulting the index entry in case it has an older
mtime as the index. Previously, the following script reliably had at
least 20 failures, while now there is no failure to be observed anymore:
```bash
j=0
for i in $(seq 100)
do
if ! ./libgit2_clar -scheckout::index::can_disable_pathspec_match >/dev/null
then
j=$(($j + 1))
fi
done
echo "Failures: $j"
```
[1]: https://git-scm.com/docs/racy-git
|
|
915f8860
|
2020-05-16T14:00:11
|
|
tests: checkout: fix stylistic issues and static variable
The test case checkout::index::can_disable_pathspec_match has some
shortcomings when it comes to coding style, which didn't fit our own
coding style. Furthermore, it had an unnecessary static local variable.
The test has been refactored to address these issues.
|
|
b85eefb4
|
2020-05-15T19:52:40
|
|
cmake: Sort source files for reproducible builds
We currently use `FILE(GLOB ...)` in most places to find source and
header files. This is problematic in that the order of files returned
depends on the operating system's directory iteration order and may thus
not be deterministic. As a result, we link object files in unspecified
order, which may cause the linker to emit different code across runs.
Fix this issue by sorting all code used as input to the libgit2 library
to improve the reliability of reproducible builds.
|
|
b43a9e66
|
2020-05-15T17:46:24
|
|
streams: openssl: fix memleak due to us not free'ing certs
When creating a `git_cert` from the OpenSSL X509 certificate of a given
stream, we do not call `X509_free()` on the certificate, leading to a
memory leak as soon as the certificate is requested e.g. by the
certificate check callback.
Fix the issue by properly calling `X509_free()`.
|
|
b7b872f5
|
2020-05-12T22:39:27
|
|
Merge pull request #5517 from libgit2/pks/futils-symlink-args
futils: fix order of declared parameters for `git_futils_fake_symlink`
|
|
a2eca682
|
2020-05-12T21:35:07
|
|
futils: fix order of declared parameters for `git_futils_fake_symlink`
While the function `git_futils_fake_symlink` is declared with arguments
`new, old`, the implementation uses the reverse order `old, new`. Let's
fix the ordering issues to be `new, old` for both, which matches what
symlink(3P) has. While at it, we also rename these parameters: `old` and
`new` doesn't really make a lot of sense in the context of symlinks,
which is why this commit renames them to be called `target` and `path`.
|
|
3f90fcd6
|
2020-05-12T21:22:48
|
|
Merge pull request #5516 from suhaibmujahid/update-release
Check the version in package.json
|
|
f1c1458c
|
2020-05-12T10:55:14
|
|
feat: Check the version in package.json
|
|
896abfc8
|
2020-05-12T11:14:10
|
|
Merge pull request #5513 from libgit2/pks/tests-fix-32-bit-formatter
tests: merge: fix printf formatter on 32 bit arches
|
|
0cf9b666
|
2020-05-12T11:41:44
|
|
tests: merge: fix printf formatter on 32 bit arches
We currently use `PRIuMAX` to print an integer of type `size_t` in
merge::trees::rename::cache_recomputation. While this works just fine on
64 bit arches, it doesn't on 32 bit ones. As a result, our nightly
builds on x86 and arm32 fail.
Fix the issue by using `PRIuZ` instead.
|
|
51a2bc43
|
2020-05-12T08:22:31
|
|
Merge pull request #5511 from suhaibmujahid/patch-1
Update package.json
|
|
045efb7b
|
2020-05-11T21:20:52
|
|
Merge pull request #5509 from libgit2/ethomson/assert_macros
Introduce GIT_ASSERT macros
|
|
31ddf163
|
2020-05-11T21:06:42
|
|
Merge pull request #5512 from A-Ovchinnikov-mx/patch-1
README.md: Add instructions for building in MinGW environment
|
|
cbae1c21
|
2020-04-01T22:12:07
|
|
assert: allow non-int returning functions to assert
Include GIT_ASSERT_WITH_RETVAL and GIT_ASSERT_ARG_WITH_RETVAL so that
functions that do not return int (or more precisely, where `-1` would
not be an error code) can assert.
This allows functions that return, eg, NULL on an error code to do that
by passing the return value (in this example, `NULL`) as a second
parameter to the GIT_ASSERT_WITH_RETVAL functions.
|
|
a95096ba
|
2020-01-12T10:31:07
|
|
assert: optionally fall-back to assert(3)
Fall back to the system assert(3) in debug builds, which may aide
in debugging.
"Safe" assertions can be enabled in debug builds by setting
GIT_ASSERT_HARD=0. Similarly, hard assertions can be enabled in
release builds by setting GIT_ASSERT_HARD to nonzero.
|
|
abe2efe1
|
2019-12-09T12:37:34
|
|
Introduce GIT_ASSERT macros
Provide macros to replace usages of `assert`. A true `assert` is
punishing as a library. Instead we should do our best to not crash.
GIT_ASSERT_ARG(x) will now assert that the given argument complies to
some format and sets an error message and returns `-1` if it does not.
GIT_ASSERT(x) is for internal usage, and available as an internal
consistency check. It will set an error message and return `-1` in the
event of failure.
|
|
4ad36338
|
2020-05-11T19:10:11
|
|
Update README.md
Add instructions for building libgit2 in MinGW environment
|
|
3453c3b1
|
2020-05-11T05:14:35
|
|
Update package.json
|