|
a8301b0c
|
2018-09-11T15:15:26
|
|
ci: add SKIP_*_TESTS for windows builds
Introduce SKIP_*_TEST variables for Windows builds to match POSIX
builds.
|
|
fff33a1b
|
2018-09-10T14:59:20
|
|
ci: write test result XML
Add the clar flags to produce JUnit-style XML output before invocation.
|
|
943181c2
|
2018-09-10T12:36:51
|
|
Revert "clar: introduce CLAR_XML option"
This reverts commit a2d73f5643814cddf90d5bf489332e14ada89ab8.
Using clar to propagate the XML settings was a mistake.
|
|
7e353b7a
|
2018-09-10T12:27:24
|
|
ci: only run the exact named test
Our CI test system invokes ctest with the name of the given tests it
wishes to invoke. ctest (with the `-R` flag) treats this name as a
regular expression. Provide anchors in the regular expression to avoid
matching additional tests in this search.
|
|
bc34cb63
|
2018-09-09T16:44:21
|
|
Merge pull request #4778 from libgit2/ethomson/clar-xml
Clar XML output redux
|
|
d17e67d0
|
2018-09-08T18:54:21
|
|
clar: iterate errors in report_all / report_errors
Instead of trying to have a clever iterator pattern that increments the
error number, just iterate over errors in the report errors or report
all functions as it's easier to reason about in this fashion.
|
|
55d354d8
|
2018-09-07T13:20:33
|
|
Merge pull request #4785 from tiennou/fix/cleanup-remote
remote: store the connection data in a private struct
|
|
1c176883
|
2018-09-07T10:36:15
|
|
remote: store the connection data in a private struct
This makes it easier to pass connection-related options around (proxy &
custom headers for now).
This fixes a bug in git_push_finish, which didn't reuse the provided
proxy if the connection closed between the call to `git_remote_push` and
the finish step.
|
|
db17b31b
|
2018-09-06T19:22:30
|
|
Merge pull request #4789 from pks-t/pks/licensing
docs: clarify and include licenses of dependencies
|
|
0bcb1d5f
|
2018-09-06T19:19:58
|
|
Merge pull request #4799 from pks-t/pks/config-multivar-quadratic
config_file: fix quadratic behaviour when adding config multivars
|
|
f2694635
|
2018-09-06T14:17:54
|
|
config_file: fix quadratic behaviour when adding config multivars
In case where we add multiple configuration entries with the same key to
a diskfile backend, we always need to iterate the list of this key to
find the last entry due to the list being a singly-linked list. This
is obviously quadratic behaviour, and this has sure enough been found by
oss-fuzz by generating a configuration file with 50k lines, where most
of them have the same key. While the issue will not arise with "sane"
configuration files, an adversary may trigger it by providing a crafted
".gitmodules" file, which is delivered as part of the repo and also
parsed by the configuration parser.
The fix is trivial: store a pointer to the last entry of the list in its
head. As there are only two locations now where we append to this data
structure, mainting this pointer is trivial, too. We can also optimize
retrieval of a single value via `config_get`, where we previously had to
chase the `next` pointer to find the last entry that was added.
Using our configuration file fozzur with a corpus that has a single file
with 50000 "-=" lines previously took around 21s. With this optimization
the same file scans in about 0.053s, which is a nearly 400-fold
improvement. But in most cases with a "normal" amount of same-named keys
it's not going to matter anyway.
|
|
bfcbde50
|
2018-08-26T16:10:34
|
|
ci: upload test results
|
|
a84863fc
|
2018-08-26T16:07:32
|
|
ci: write xml during test runs
|
|
b67a93ff
|
2018-09-04T14:00:49
|
|
clar: remove globals; error-check fprintf/fclose
Remove the global summary filename and file pointer; pass them in to the
summary functions as needed. Error check the results of buffered I/O
calls.
|
|
e595eeb5
|
2018-08-27T01:06:37
|
|
ci: use more compatible strftime formats
Windows lacks %F and %T formats for strftime. Expand them to the
year/month/day and hour/minute/second formats, respectively.
|
|
6b2d8f09
|
2018-08-26T18:05:31
|
|
ci: use templates for VSTS builds
Our build YAML is becoming unweildly and full of copy-pasta. Simplify
with templates.
|
|
306875bc
|
2018-08-26T17:27:54
|
|
ci: explicitly run in the build directory
Explicitly run from the build directory, not the source. (I was
mistaken about the default working directory for VSTS agents.)
|
|
f3f2c45e
|
2018-08-26T17:12:17
|
|
ci: escape xml output path on Windows
CMake treats backslashes as escape characters; use forward slashes for
the XML output path.
|
|
a2d73f56
|
2018-08-24T11:23:19
|
|
clar: introduce CLAR_XML option
Introduce a CLAR_XML option, to run the `ctest` commands with the new
`-r` flag to clar. Permitted values are `OFF`, `ON` and a directory to
write the XML test results to.
|
|
baa5c20d
|
2018-08-26T15:31:14
|
|
clar: accept a value for the summary filename
Accept an (optional) value for the summary filename. Continues to
default to summary.xml.
|
|
dbebcb04
|
2018-08-26T15:25:15
|
|
clar: don't use a variable named `time`
|
|
59f1e477
|
2018-07-27T23:00:09
|
|
Barebones JUnit XML output
|
|
3a9b9631
|
2018-07-26T23:02:34
|
|
Documentation
|
|
bf9fc126
|
2018-07-26T23:02:20
|
|
Isolate test reports
This makes it possible to keep track of every test status (even
successful ones), and their errors, if any.
|
|
90753a96
|
2018-08-26T15:11:21
|
|
clar: refactor explicitly run test behavior
Previously, supplying `-s` to explicitly enable some test(s) would run
the tests immediately from the argument parser. This forces us to set
up the entire clar environment (for example: sandboxing) before argument
parsing takes place.
Refactor the behavior of `-s` to add the explicitly chosen tests to a
list that is executed later. This untangles the argument parsing from
the setup lifecycle, allowing us to use the arguments to perform the
setup.
|
|
695067f7
|
2018-09-06T11:54:01
|
|
Merge pull request #4792 from nelhage/multiline-leak
config: Fix a leak parsing multi-line config entries
|
|
6f525a19
|
2018-09-06T11:52:18
|
|
Merge pull request #4797 from bisho/patch-2
Prevent heap-buffer-overflow
|
|
d22cd1f4
|
2018-09-05T11:49:13
|
|
Prevent heap-buffer-overflow
When running repack while doing repo writes, `packfile_load__cb()` can see some temporary files in the directory that are bigger than the usual, and makes `memcmp` overflow on the `p->pack_name` string. ASAN detected this. This just uses `strncmp`, that should not have any performance impact and is safe for comparing strings of different sizes.
```
ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61200001a3f3 at pc 0x7f4a9e1976ec bp 0x7ffc1f80e100 sp 0x7ffc1f80d8b0
READ of size 89 at 0x61200001a3f3 thread T0
SCARINESS: 26 (multi-byte-read-heap-buffer-overflow)
#0 0x7f4a9e1976eb in __interceptor_memcmp.part.78 (/build/cfgr-admin#link-tree/libtools_build_sanitizers_asan-ubsan-py.so+0xcf6eb)
#1 0x7f4a518c5431 in packfile_load__cb /build/libgit2/0.27.0/src/libgit2-0.27.0/src/odb_pack.c:213
#2 0x7f4a518d9582 in git_path_direach /build/libgit2/0.27.0/src/libgit2-0.27.0/src/path.c:1134
#3 0x7f4a518c58ad in pack_backend__refresh /build/libgit2/0.27.0/src/libgit2-0.27.0/src/odb_pack.c:347
#4 0x7f4a518c1b12 in git_odb_refresh /build/libgit2/0.27.0/src/libgit2-0.27.0/src/odb.c:1511
#5 0x7f4a518bff5f in git_odb__freshen /build/libgit2/0.27.0/src/libgit2-0.27.0/src/odb.c:752
#6 0x7f4a518c17d4 in git_odb_stream_finalize_write /build/libgit2/0.27.0/src/libgit2-0.27.0/src/odb.c:1415
#7 0x7f4a51b9d015 in Repository_write /build/pygit2/0.27.0/src/pygit2-0.27.0/src/repository.c:509
```
|
|
045cc321
|
2018-09-03T19:51:33
|
|
Merge pull request #4790 from libgit2/ethomson/travis
ci: remove travis
|
|
76cfeb20
|
2018-09-03T19:27:30
|
|
README: remove travis
|
|
bc63e1ef
|
2018-09-03T10:49:46
|
|
config_parse: refactor error handling when parsing multiline variables
The current error handling for the multiline variable parser is a bit
fragile, as each error condition has its own code to clear memory.
Instead, unify error handling as far as possible to avoid this
repetitive code. While at it, make use of `GITERR_CHECK_ALLOC` to
correctly handle OOM situations and verify that the buffer we print into
does not run out of memory either.
|
|
6d9b1f08
|
2018-09-02T18:00:05
|
|
Merge pull request #4791 from DavidStaheli/users/davidstaheli/vsts-yaml
Update VSTS YAML files with the latest syntax
|
|
38b85255
|
2018-09-01T03:50:26
|
|
config: Fix a leak parsing multi-line config entries
|
|
7238a1e8
|
2018-08-31T14:11:28
|
|
Update .vsts-ci.yml
|
|
40c3a974
|
2018-08-31T14:07:59
|
|
Update .vsts-nightly.yml
|
|
6fc946e8
|
2018-08-30T21:53:58
|
|
ci: remove travis
|
|
7edc1c87
|
2018-08-30T12:51:05
|
|
Merge pull request #4788 from tiennou/doc-fixes
Documentation fixes
|
|
2054fe50
|
2018-08-30T12:41:15
|
|
Merge pull request #4781 from nelhage/multiline-loop
config: convert unbounded recursion into a loop
|
|
db0c6648
|
2018-08-30T12:22:26
|
|
Merge pull request #4773 from RandomSort/giterr
Document giterr_last() use only after error. #4772
|
|
2e0f926e
|
2018-08-30T12:16:40
|
|
docs: clarify and include licenses of dependencies
While our contribution guide tries to make clear the licenses that apply
to libgit2, it does not make clear that different licenses apply to our
bundled dependencies. Make this clear by listing each dependency
together with the licenses that they are governed by. Furthermore,
bundle the complete license texts next to the code they apply to.
|
|
a4a028be
|
2018-08-29T22:49:35
|
|
diff: documentation mashup
|
|
9890f059
|
2018-08-29T22:04:42
|
|
push: make the parallelism default follow the docs
|
|
7765c0a9
|
2018-08-29T21:56:26
|
|
doc: fix comment on GIT_EUSER
|
|
c0b2e525
|
2018-08-27T09:23:02
|
|
Add two words to clarify
|
|
df2f276e
|
2018-08-26T13:22:55
|
|
Merge pull request #4765 from tiennou/fix/macos-qsort_r
util: make the qsort_r check work on macOS
|
|
2494b117
|
2018-08-26T12:09:18
|
|
Merge pull request #4782 from libgit2/ethomson/fuzzer
fuzzer: update for indexer changes
|
|
6d6bec0c
|
2018-08-26T11:52:21
|
|
fuzzer: update for indexer changes
|
|
85eb2cb6
|
2018-08-26T11:33:42
|
|
Merge pull request #4727 from libgit2/cmn/null-oid-existing-tree
tree: accept null ids in existing trees when updating
|
|
50186ce8
|
2018-08-26T11:26:45
|
|
Merge pull request #4374 from pks-t/pks/pack-file-verify
Pack file verification
|
|
a03113e8
|
2018-08-25T17:04:39
|
|
config: convert unbounded recursion into a loop
|
|
1a9cc182
|
2018-08-17T15:56:30
|
|
util: make the qsort_r check work on macOS
This performs a compile-check by using CMake support, to differentiate the GNU
version from the BSD version of qsort_r.
Module taken from 4f252abea5f1d17c60f6ff115c9c44cc0b6f1df6, which I've checked
against CMake 2.8.11.
|
|
8856337b
|
2018-08-24T10:58:54
|
|
Merge pull request #4777 from pks-t/pks/cmake-iconv-via-libc
cmake: detect and use libc-provided iconv
|
|
9a193102
|
2018-08-24T11:01:39
|
|
Merge pull request #4774 from tiennou/fix/clang-analyzer
Coverity flavored clang analyzer fixes
|
|
fd7ab1d7
|
2018-08-24T09:47:09
|
|
Merge pull request #4776 from pks-t/pks/test-index-invalid-filemode
tests: verify adding index conflicts with invalid filemodes fails
|
|
503af775
|
2018-08-24T10:08:09
|
|
Merge pull request #4769 from tiennou/fix/worktree-unlock
worktree: unlock should return 1 when the worktree isn't locked
|
|
2e2d8c64
|
2018-08-24T09:53:39
|
|
cmake: detect and use libc-provided iconv
While most systems provide a separate iconv library against which
applications can link, musl based systems do not provide such a library.
Instead, iconv functions are directly included in the C library. As our
current CMake module to locate the iconv library only checks whether a
library exists somewhere in the typical library directories, we will
never build libgit2 with libiconv support on such systems.
Extend the iconv module to also search whether libc provides iconv
functions, which we do by checking whether the `iconv_open` function
exists inside of libc. If this is the case, we will default to use the
libc provided one instead of trying to use a separate libiconv. While
this changes which iconv we use on systems where both libc and an
external libiconv exist, to the best of my knowledge common systems only
provide either one or the other.
Note that libiconv support in musl is held kind of basic. To quote musl
libc's page on functional differences from glibc [1]:
The iconv implementation musl is very small and oriented towards
being unobtrusive to static link. Its character set/encoding
coverage is very strong for its size, but not comprehensive like
glibc’s.
As we assume iconv to be a lot more capable than what musl provides,
some of our tests will fail if using iconv on musl-based platforms.
[1]: https://wiki.musl-libc.org/functional-differences-from-glibc.html
|
|
0036993b
|
2018-08-24T09:29:32
|
|
Merge pull request #4752 from nelhage/fuzz-config
Add a fuzzer for config files
|
|
3a1f5df8
|
2018-08-24T09:15:29
|
|
tests: verify adding index conflicts with invalid filemodes fails
Commit 581d5492f (Fix leak in index.c, 2018-08-16) was fixing a memory
leak in our code adding conflicts to the index when the added index
entries have an invalid file mode. The memory leak was previously
undiscovered as there are no tests covering this scenario, which is now
being added by this commit.
|
|
296cb5e6
|
2018-08-24T09:07:01
|
|
Merge pull request #4763 from cschlack/fix_ng_packets
Fix 'invalid packet line' for ng packets containing errors
|
|
1c949ce1
|
2018-08-21T02:11:32
|
|
transport/http: do not return success if we failed to get a scheme
Otherwise we return a NULL context, which will get dereferenced in
apply_credentials.
|
|
22d013b6
|
2018-08-21T01:55:56
|
|
remote: set the error before cleanup
Otherwise we'll return stack data to the caller.
|
|
ad95873b
|
2018-08-21T01:41:05
|
|
mailmap: Undefined or garbage value returned to caller
In case there was nothing to parse in the buf, we'd return uninitialized
stack data.
|
|
aa8cb586
|
2018-08-21T01:12:11
|
|
revwalk: The left operand of '<' is a garbage value
At line 594, we do this :
if (error < 0)
return error;
but if nothing was pushed in a GIT_SORT_TIME revwalk, we'd return
uninitialized stack data.
|
|
4bd2a508
|
2018-08-20T13:51:28
|
|
Update giterr_last API documentation to reflect real behaviour
|
|
73e31f6f
|
2018-08-20T12:08:50
|
|
Rephrase wording on giterr_last documentation
|
|
3602b573
|
2018-08-20T10:08:30
|
|
Document giterr_last() use only after error. #4772
|
|
5b0258ad
|
2018-08-19T23:01:38
|
|
Merge pull request #4768 from abyss7/master
Fix leak in index.c
|
|
cada553c
|
2018-08-19T15:54:10
|
|
Merge pull request #4754 from libgit2/ethomson/threads
threads::diff: use separate git_repository objects
|
|
2afd0185
|
2018-08-19T12:57:29
|
|
threads::iterator: use separate repository objects
Our thread policies state that we cannot re-use the `git_repository`
across threads. Our tests cannot deviate from that.
Courtesy of Ximin Luo, https://github.com/infinity0:
https://github.com/libgit2/libgit2/issues/4753#issuecomment-412247757
|
|
c1ef58ac
|
2018-08-17T15:17:07
|
|
Merge pull request #4766 from pks-t/pks/travis-remove-coverity
travis: remove Coverity cron job
|
|
50dd7fea
|
2018-08-11T13:06:14
|
|
Fix 'invalid packet line' for ng packets containing errors
|
|
59c2e70e
|
2018-08-17T00:51:51
|
|
worktree: unlock should return 1 when the worktree isn't locked
The documentation states that git_worktree_unlock returns 0 on success,
and 1 on success if the worktree wasn't locked. Turns out we were
returning 0 in any of those cases.
|
|
581d5492
|
2018-08-16T22:45:43
|
|
Fix leak in index.c
|
|
f556dea6
|
2018-08-16T15:10:51
|
|
Add a proper write loop
|
|
622e12c1
|
2018-08-16T10:35:31
|
|
Merge pull request #4749 from neithernut/fix-git__linenlen-ub
parse: Do not initialize the content in context to NULL
|
|
43e7bf78
|
2018-08-16T10:27:49
|
|
Merge pull request #4750 from nelhage/nelhage-config-no-section
config_file: Don't crash on options without a section
|
|
6259e29e
|
2018-08-16T09:36:38
|
|
travis: remove Coverity cron job
With the recent addition of VSTS to our CI infrastructure, we now have
two cron jobs running regular Coverity analysis. It doesn't really make
a lot of sense to upload two different analysis on our sources to
Corverity, though:
- in the worst case, Coverity will be repeatedly confused when different
sets of sources get analyzed and uploaded
- in the best case, nothing is gained because the sources have already
been analyzed via the other job
Let's just use a single cron job for Coverity. Considering that VSTS
seems to be the more beefy and flexible platform, it is more likely to
be our future target CI platform. Thus, we retain its support for
Coverity and instead remove it from Travis.
|
|
227ace0f
|
2018-08-14T20:32:42
|
|
Merge pull request #4764 from tiennou/ci/coverity-only
ci: Correct the status code check so Coverity doesn't force-fail Travis
|
|
351ca661
|
2018-08-14T21:26:14
|
|
ci: Correct the status code check so Coverity doesn't force-fail Travis
Otherwise you get something like
Emitted 525 C/C++ compilation units (100%) successfully
525 C/C++ compilation units (100%) are ready for analysis
The cov-build utility completed successfully.
Build successfully submitted.
Received error code 200 from Coverity
travis_time:end:14cf6373:start=1534254309066933889,finish=1534254728190974302,duration=419124040413
The command "if [ -n "$COVERITY" ]; then ../ci/coverity.sh; fi" exited with 1.
travis_time:start:01ed61d4
$ if [ -z "$COVERITY" ]; then ../ci/build.sh && ../ci/test.sh; fi
travis_time:end:01ed61d4:start=1534254728197560961,finish=1534254728202711214,duration=5150253
The command "if [ -z "$COVERITY" ]; then ../ci/build.sh && ../ci/test.sh; fi" exited with 0.
Done. Your build exited with 1.
|
|
6698e056
|
2018-08-14T04:22:14
|
|
Fix the test and comment.
|
|
b8d4578a
|
2018-08-14T04:01:30
|
|
Add a copyright header.
|
|
298f5df6
|
2018-08-14T04:01:04
|
|
Further review comments, fix the build
|
|
8189642d
|
2018-08-14T03:55:58
|
|
Reformat
|
|
f1409500
|
2018-08-14T03:54:01
|
|
Write a test.
|
|
9913e2df
|
2018-08-09T09:49:33
|
|
Merge pull request #4760 from libgit2/ethomson/ci
ci: remove appveyor
|
|
658b8e8a
|
2018-08-09T09:39:39
|
|
readme: remove appveyor build badge
|
|
e9b2e434
|
2018-08-09T09:30:36
|
|
Merge pull request #4761 from pks-t/pks/aix-diff-oom
diff: fix OOM on AIX when finding similar deltas in empty diff
|
|
c65568d8
|
2018-08-09T12:48:26
|
|
diff: fix OOM on AIX when finding similar deltas in empty diff
The function `git_diff_find_similar` keeps a function of cache
similarity metrics signatures, whose size depends on the number of
deltas passed in via the `diff` parameter. In case where the diff is
empty and thus doesn't have any deltas at all, we may end up allocating
this cache via a call to `git__calloc(0, sizeof(void *))`. At least on
AIX, allocating 0 bytes will result in a `NULL` pointer being returned,
which causes us to erroneously return an OOM error.
Fix this situation by simply returning early in case where we are being
passed an empty diff, as we cannot find any similarities in that case
anyway.
|
|
3ce31df3
|
2018-08-06T16:33:15
|
|
ci: remove appveyor
|
|
9275d84c
|
2018-08-06T13:14:08
|
|
Merge pull request #4755 from pks-t/pks/travis-coverity-cron
travis: do not execute Coverity analysis for all cron jobs
|
|
b093bb56
|
2018-08-06T13:08:15
|
|
Merge pull request #4759 from pks-t/pks/ci-werror
ci: enable compilation with "-Werror"
|
|
9ada072e
|
2018-08-06T13:31:23
|
|
Merge pull request #4758 from pks-t/pks/smart-pkt-oob-read
smart_pkt: fix potential OOB-read when processing ng packet
|
|
90084657
|
2018-08-06T09:12:48
|
|
ci: enable compilation with "-Werror"
During the conversion of our CI scripts in bf418f09c (ci: refactor unix
ci build/test scripts, 2018-07-14), we accidentally dropped the
"-DENABLE_WERROR=ON" switch in our cmake invocation. Re-add it to help
us catch compiler warnings early.
|
|
0fcd0563
|
2018-08-06T12:00:21
|
|
odb: fix use of wrong printf formatters
The `git_odb_stream` members `declared_size` and `received_bytes` are
both of the type `git_off_t`, which we usually defined to be a 64 bit
signed integer. Thus, passing these members to "PRIdZ" formatters is not
correct, as they are not guaranteed to accept big enough numbers.
Instead, use the "PRId64" formatter, which is able to represent 64 bit
signed integers.
|
|
c9ad2506
|
2018-08-06T07:38:29
|
|
Merge pull request #4751 from nelhage/config-double-free
Fix a double-free in config parsing
|
|
0a6c13a2
|
2018-08-06T07:13:56
|
|
travis: do not execute Coverity analysis for all cron jobs
The new Travis cron job gets executed daily, but our current
configuration will cause each job to execute our Coverity script instead
of the default build and testing scripts. This cannot work, as Coverity
is heavily rate-limiting its API, so our cron builds are doomed to
always fail. What we want to do instead is execute our normal builds,
but add an additional Coverity jobs.
This can easily be done by adding another Coverity-specific job with a
conditional "type = cron", which sets the "COVERITY" environment
variable. Instead of checking the build type, we then simply check
whether "COVERITY" is set or not.
|
|
ec76a1aa
|
2018-08-05T14:37:08
|
|
Add a comment
|
|
019409be
|
2018-08-05T14:25:22
|
|
Don't error on missing section, just continue
|
|
d1919485
|
2018-08-05T11:01:14
|
|
threads::diff: use separate git_repository objects
Our thread policies state that we cannot re-use the `git_repository`
across threads. Our tests cannot deviate from that.
|
|
b8a67eda
|
2018-07-22T23:47:12
|
|
Fix a double-free in config parsing
|