summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* status::renames: write NFD instead of NFC filenameethomson/apfs_precompose_fixesEdward Thomson2018-01-211-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Update the status::renames test to create an NFD format filename in the core.precomposedunicode tests. Previously, we would create an NFC format filename. This was to take advantage of HFS+ filesystems, which always use canonically decomposed formats, and would actually write the filename to disk as an NFD filename. So previously, we could create an NFC filename, but read it normally as an NFD filename. But APFS formats do not force canonically decomposed formats for filenames, so creating an NFC filename does not get converted to NFD. Instead, the filename will be written in NFC format. Our test, therefore, does not work - when we write an NFC filename, it will _remain_ NFC. Update the test to write NFD always. This will ensure that the file will actually be canonically decomposed on all platforms: HFS+, which forces NFD, and APFS, which does not. Thus, our test will continue to ensure that an NFD filename is canonically precomposed on all filesystems.
* Merge pull request #4484 from pks-t/pks/fail-creating-branch-HEADEdward Thomson2018-01-201-0/+6
|\ | | | | branch: refuse creating branches named 'HEAD'
| * branch: refuse creating branches named 'HEAD'Patrick Steinhardt2018-01-191-0/+6
| | | | | | | | | | | | | | | | Since a625b092c (branch: correctly reject refs/heads/{-dash,HEAD}, 2017-11-14), which is included in v2.16.0, upstream git refuses to create branches which are named HEAD to avoid ambiguity with the symbolic HEAD reference. Adjust our own code to match that behaviour and reject creating branches names HEAD.
* | Merge pull request #4478 from libgit2/cmn/packed-refs-sortedEdward Thomson2018-01-201-1/+1
|\ \ | | | | | | refs: include " sorted " in our packed-refs header
| * | refs: include " sorted " in our packed-refs headercmn/packed-refs-sortedCarlos Martín Nieto2018-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | This lets git know that we do in fact have written our packed-refs file sorted (which is apparently not necessarily the case) and it can then use the new-ish mmaped access which lets it avoid significant amounts of effort parsing potentially large files to get to a single piece of data.
* | | Merge pull request #4483 from libgit2/cmn/prettify-docsEdward Thomson2018-01-201-3/+2
|\ \ \ | | | | | | | | message: update docs for git_message_prettify
| * | | message: update docs for git_message_prettifycmn/prettify-docsCarlos Martín Nieto2018-01-191-3/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | We used to hard-code the octothorpe as the comment character and the documentation still mentions this even though we accept the comment character as a parameter. Update the line to indicate this and clean up the first paragraph a bit.
* | | Merge pull request #4481 from pks-t/pks/tests-online-clone-url-memleakCarlos Martín Nieto2018-01-191-0/+2
|\ \ \ | |/ / |/| | tests: online::clone: fix memory leak due to not freeing URL
| * | tests: online::clone: fix memory leak due to not freeing URLPatrick Steinhardt2018-01-181-0/+2
|/ /
* | Merge pull request #4451 from libgit2/charliesome/trailer-infoBrian Lopez2018-01-173-0/+622
|\ \ | | | | | | Implement message trailer parsing API
| * | rename find_trailer to extract_trailer_blockcharliesome/trailer-infoBrian Lopez2018-01-171-2/+2
| | |
| * | update code docsBrian Lopez2018-01-161-4/+15
| | |
| * | just use git_message_trailer in testsBrian Lopez2018-01-161-15/+10
| | |
| * | try and fix windows buildBrian Lopez2018-01-161-1/+2
| | |
| * | Change trailer API to return a simple arrayBrian Lopez2018-01-163-32/+46
| | |
| * | Merge remote-tracking branch 'origin/master' into charliesome/trailer-infoBrian Lopez2018-01-1022-123/+157
| |\ \ | | |/
| * | switch back to braced array initializersBrian Lopez2018-01-051-61/+40
| | |
| * | make separators const a macro as wellBrian Lopez2018-01-031-5/+4
| | |
| * | remove empty lines between @-linesBrian Lopez2018-01-031-3/+0
| | |
| * | make comment_line_char const a macroBrian Lopez2018-01-031-4/+4
| | |
| * | Don't use newer C syntax for declaration in testsBrian Lopez2018-01-031-57/+78
| | |
| * | Merge remote-tracking branch 'origin/master' into charliesome/trailer-infoBrian Lopez2018-01-0244-427/+1397
| |\ \
| * | | trailer: use git__prefixcmp instead of starts_withCharlie Somerville2017-12-201-15/+3
| | | |
| * | | trailer: remove inline specifier on is_blank_lineCharlie Somerville2017-12-201-1/+1
| | | |
| * | | tests: add message trailer parsing test casesCharlie Somerville2017-12-191-0/+179
| | | |
| * | | message: add routine for parsing trailers from messagesCharlie Somerville2017-12-192-0/+438
| | | | | | | | | | | | | | | | | | | | This is implemented in trailer.c and borrows a large amount of logic from Git core to ensure compatibility.
* | | | Merge pull request #4477 from pks-t/pks/memleaksCarlos Martín Nieto2018-01-174-8/+6
|\ \ \ \ | |_|_|/ |/| | | Memory leaks
| * | | tests: refs::iterator: fix memory leak due to ref names not being free'dPatrick Steinhardt2018-01-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The test refs::iterator::foreach_name iterates through every reference and copies its name into a local vector. While the test makes sure to free the vector afterwards, the copied reference names are not being free'd. Fix that.
| * | | refs: document need to free refs in foreach-callbackPatrick Steinhardt2018-01-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | References passed to the callback function of `git_reference_foreach` are expected to be owned by the callback. As such, they are never being freed by `git_reference_foreach`, but will have to be freed by the caller. This small detail is never mentioned in the function's documentation, though, making it easy to get wrong. Document this to make it discoverable.
| * | | transports: local: fix memory leak in reference walkPatrick Steinhardt2018-01-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upon downloading the pack file, the local transport will iterate through every reference using `git_reference_foreach`. The function is a bit tricky though in that it requires the passed callback to free the references, which does not currently happen. Fix the memory leak by freeing all passed references in the callback.
| * | | tests: network::fetchlocal: let cleanup function handle sandbox cleanupPatrick Steinhardt2018-01-121-8/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | Two tests in network::fetchlocal explicitly set a cleanup function to free and remove the created sandbox repositories. This is not necessary, though, as the cleanup function executed after each test already takes care of cleaning up after them. Remove the code to avoid needless code duplication.
* | | Merge pull request #4472 from libgit2/ethomson/libgit2deps_azureCarlos Martín Nieto2018-01-101-2/+2
|\ \ \ | | | | | | | | travis: fetch trusty dependencies from Bintray
| * | | travis: we use bintray's own key for signingethomson/libgit2deps_azureCarlos Martín Nieto2018-01-101-1/+1
| | | | | | | | | | | | The VM on Travis apparently will still proceed, but it's good practice.
| * | | travis: fetch trusty dependencies from bintrayEdward Thomson2018-01-101-1/+1
| | | | | | | | | | | | | | | | The trusty dependencies are now hosted on Bintray.
* | | | Merge pull request #4471 from libgit2/cmn/cmake-feature-302Patrick Steinhardt2018-01-101-1/+2
|\ \ \ \ | |/ / / |/| | | cmake: use a FEATURE_SUMMARY call compatible with 3.0.2
| * | | cmake: use a FEATURE_SUMMARY call compatible with 3.0.2cmn/cmake-feature-302Carlos Martín Nieto2018-01-101-1/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we print features, we make an effort to support all the way back to pre-3.0. However, in the code for versions from 3 onward we call `FEATURE_SUMMARY` with multiple kinds of elements to print in the same line. This is only supported in CMake 3.1 and later, making the rather popular CMake 3.0.2 unable to build the library. Use a single kind of element per invocation. This means we need to provide a "description" text, which CMake provides for us if provide multiple kinds of elements.
* | | Merge pull request #4468 from libgit2/cmn/openssl-pcCarlos Martín Nieto2018-01-081-2/+6
|\ \ \ | | | | | | | | Make sure to include 'openssl' as a dep when building statically with SHA1DC
| * | | cmake: add openssl to the private deps list when it's the TLS implementationCarlos Martín Nieto2018-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We might want OpenSSL to be the implementation for SHA-1 and/or TLS. If we only want it for TLS (e.g. we're building with the collision-detecting SHA-1 implementation) then we did not indicate this to the systems including us a static library. Add OpenSSL to the list also during the TLS decision to make sure we say we should link to it if we use it for TLS.
| * | | cmake: treat LIBGIT2_PC_REQUIRES as a listCarlos Martín Nieto2018-01-081-2/+5
|/ / / | | | | | | | | | | | | | | | It is indeed a list of dependencies for those which include the static archive. This is in preparation for adding two possible places where we might add openssl as a dependency.
* | | Merge pull request #4467 from libgit2/cmn/static-archive-laterCarlos Martín Nieto2018-01-071-4/+6
|\ \ \ | | | | | | | | cmake: move the rule to find static archives close to building clar
| * | | cmake: move the rule to find static archives close to building clarcmn/static-archive-laterCarlos Martín Nieto2018-01-071-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we're building static libraries, we want to use that for building our clar binary. This is done in 49551254 (2017-09-22; cmake: use static dependencies when building static libgit2) but that commit included the rule too early, making it affect the search for iconv, meaning we did not find it when we were building a static libgit2. Move the rule to just before building clar, after we've included the rules for building the library itself. This lets us find and link to the dynamic libiconv.
* | | | Merge pull request #4398 from pks-t/pks/generic-sha1Edward Thomson2018-01-052-21/+27
|\ \ \ \ | |/ / / |/| | | cmake: allow explicitly choosing SHA1 backend
| * | | cmake: allow explicitly choosing SHA1 backendPatrick Steinhardt2018-01-042-21/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, if SHA1DC is disabled, the SHA1 backend is mostly chosen based on which system libgit2 is being compiled on and which libraries have been found. To give developers and distributions more choice, enable them to request specific backends by passing in a `-DSHA1_BACKEND=<BACKEND>` option instead. This completely replaces the previous auto-selection.
| * | | cmake: default to using SHA1DCPatrick Steinhardt2018-01-041-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | Upstream git.git has changed their default SHA1 implementation to the collision-detection algorithm SHA1DC in commit e6b07da27 (Makefile: make DC_SHA1 the default, 2017-03-17). To match upstream, align ourselves and switch over to SHA1DC by default.
* | | Merge pull request #4257 from pks-t/pks/stale-testEdward Thomson2018-01-0311-58/+43
|\ \ \ | | | | | | | | Execute stale tests
| * | | tests: create new test target for all SSH-based testsPatrick Steinhardt2018-01-032-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some tests shall be run against our own SSH server we spin up in Travis. As those need to be run separate from our previous tests which run against git-daemon, we have to do this in a separate step. Instead of bundling all that knowledge in the CI script, move it into the test build instructions by creating a new test target.
| * | | tests: online::clone: inline creds-test with nonexistent URLPatrick Steinhardt2018-01-034-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, we test our credential callback code twice, once via SSH on localhost and once via a non-existent GitHub repository. While the first URL makes sense to be configurable, it does not make sense to hard-code the non-existing repository, which requires us to call tests multiple times. Instead, we can just inline the URL into another set of tests.
| * | | tests: online::clone: construct credential-URL from environmentPatrick Steinhardt2018-01-034-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We support two types of passing credentials to the proxy, either via the URL or explicitly by specifying user and password. We test these types by modifying the proxy URL and executing the tests twice, which is in fact unnecessary and requires us to maintain the list of environment variables and test executions across multiple CI infrastructures. To fix the situation, we can just always pass the host, port, user and password to the tests. The tests can then assemble the complete URL either with or without included credentials, allowing us to test both cases in-process.
| * | | tests: perf: build but exclude performance tests by defaultPatrick Steinhardt2018-01-032-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our performance tests (or to be more concrete, our single performance test) are not built by default, as they are always #ifdef'd out. While it is true that we don't want to run performance tests by default, not compiling them at all may cause code rot and is thus an unfavorable approach to handle this. We can easily improve this situation: this commit removes the #ifdef, causing the code to always be compiled. Furthermore, we add `-xperf` to the default command line parameters of `generate.py`, thus causing the tests to be excluded by default. Due to this approach, we are now able to execute the performance tests by passing `-sperf` to `libgit2_clar`. Unfortunately, we cannot execute the performance tests on Travis or AppVeyor as they rely on history being available for the libgit2 repository. As both do a shallow clone only, though, this is not given.
| * | | tests: iterator::workdir: fix reference count in stale testPatrick Steinhardt2018-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test `iterator::workdir::filesystem_gunk` is usually not executed, as it is guarded by the environment variable "GITTEST_INVASIVE_SPEED" due to its effects on speed. As such, it has become stale and does not account for new references which have meanwhile been added to the testrepo, causing it to fail. Fix this by raising the number of expected references to 15.