summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* revspec: rename git_revparse_mode_t to git_revspec_tethomson/revparseEdward Thomson2021-01-319-30/+51
| | | | | | The information about the type of a revision spec is not information about the parser. Name it accordingly, so that `git_revparse_mode_t` is now `git_revspec_t`. Deprecate the old name.
* meta: tell "linguist" that the test resources are vendoredEdward Thomson2021-01-221-0/+1
| | | | | | | Our test resources shouldn't count toward our language statistics. We have some PHP checked in to the test resources, but I assure you that we do not have any production code in PHP and we shouldn't be blamed for the test data.
* Merge pull request #5780 from libgit2/ethomson/ciEdward Thomson2021-01-153-3/+12
|\ | | | | ci: don't use ninja on macOS
| * ci: don't use ninja on macOSEdward Thomson2021-01-153-3/+12
|/ | | | | | Ninja is not installed by default on the macOS machines; stop trying to use it. Instead use `make -j` which should be roughly equivalent in performance but supported everywhere.
* Merge pull request #5768 from lhchavez/midx-needs-refreshEdward Thomson2021-01-152-1/+2
|\ | | | | midx: Fix a bug in `git_midx_needs_refresh()`
| * midx: Fix a bug in `git_midx_needs_refresh()`lhchavez2021-01-072-1/+2
| | | | | | | | | | The very last check in the freshness check for the midx was wrong >< This was also because this function was not tested.
* | Merge pull request #5775 from libgit2/ethomson/clone_branchEdward Thomson2021-01-102-21/+50
|\ \ | | | | | | clone: set refs/remotes/origin/HEAD when branch is specified
| * | clone: set refs/remotes/origin/HEAD when branch is specifiedethomson/clone_branchEdward Thomson2021-01-072-21/+50
| | | | | | | | | | | | | | | | | | When a branch is specified to check out in clone, update the remote tracking `HEAD` to point to it. This mimics git's behavior, when `git clone -b <name>` is used.
* | | Merge pull request #5769 from lhchavez/pwrite-preadEdward Thomson2021-01-073-11/+3
|\ \ \ | | | | | | | | Use `p_pwrite`/`p_pread` consistently throughout the codebase
| * | | Use `p_pwrite`/`p_pread` consistently throughout the codebaselhchavez2021-01-073-11/+3
| | |/ | |/| | | | | | | | | | | | | This change stops using the seek+read/write combo to perform I/O with an offset, since this is faster by one system call (and also more atomic and therefore safer).
* | | Merge pull request #5772 from libgit2/ethomson/readmeEdward Thomson2021-01-071-0/+23
|\ \ \ | | | | | | | | README: instructions for using libgit2 without compiling
| * | | README: instructions for using libgit2 without compilingethomson/readmeEdward Thomson2021-01-071-0/+23
| | |/ | |/|
* | | Merge pull request #5770 from libgit2/ethomson/empty_default_branchEdward Thomson2021-01-074-1/+57
|\ \ \ | |_|/ |/| | Cope with empty default branch
| * | repo: ignore empty init.defaultbranchethomson/empty_default_branchEdward Thomson2021-01-072-1/+18
| | | | | | | | | | | | | | | | | | The init.defaultbranch option may be set, but empty. In this case, we should ignore it instead of trying to set our default branch to `refs/heads/`.
| * | remote: don't update invalid refsEdward Thomson2021-01-071-0/+10
| | | | | | | | | | | | | | | If a symbolic reference points to something invalid, then do not try to update it.
| * | fetch: test when HEAD points to nonexistent branchEdward Thomson2021-01-071-0/+29
| |/ | | | | | | | | | | | | | | When HEAD points to a nonexistent or invalid branch - for example, to `refs/heads/` - the fetch should be permitted to continue, but we should not use it when creating the `for merge` option in the FETCH_HEAD file. (This emulates git's behavior.)
* | Merge pull request #5771 from lhchavez/fix-ciEdward Thomson2021-01-072-5/+5
|\ \ | |/ |/| github-actions: Also rename the main branch here
| * github-actions: Also rename the main branch herelhchavez2021-01-072-5/+5
|/ | | | This should fix the CI.
* Merge pull request #5760 from libgit2/ethomson/tttoo_many_tttsEdward Thomson2021-01-074-6/+9
|\ | | | | blob: fix name of `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD`
| * blob: fix name of `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD`ethomson/tttoo_many_tttsEdward Thomson2021-01-054-6/+9
| | | | | | | | | | | | `GIT_BLOB_FILTER_ATTTRIBUTES_FROM_HEAD` is misspelled, it should be `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD`, and it would be if it were not for the MacBook Pro keyboard and my inattentiveness.
* | Merge pull request #5759 from JoshuaS3/mastermasterEdward Thomson2021-01-063-0/+30
|\ \ | |/ |/| Add documentation for git_blob_filter_options.version
| * Update documentation for git_blob_filter_optionsJosh Stockin2021-01-051-1/+2
| | | | | | | | Adds info about initializing options with git_blob_filter_options_init
| * blob: add git_blob_filter_options_initEdward Thomson2021-01-053-0/+26
| | | | | | | | | | | | The `git_blob_filter_options_init` function should be included, to allow callers in FFI environments to let us initialize an options structure for them.
| * Fix documentation for git_blob_filter_optionsJosh Stockin2021-01-041-1/+1
| |
| * Move doc comment about `GIT_BLOB_FILTER_OPTIONS_VERSION`Josh Stockin2021-01-041-1/+3
| | | | | | | | | | | | | | | | | | | | Removes doc comment on `git_blob_filter_options.version`, moves information to `git_blob_filter_options` doc comment to remain consistent with other options structures' documentation. `git_blob_filter_options_init` still needed; should be added in another commit/PR (it's out of the scope of this PR, #5759), update this documentation again.
| * Add documentation for git_blob_filter_options.versionJosh Stockin2021-01-031-0/+1
| | | | | | | | Resolves #5756
* | Merge pull request #5583 from 0xdky/dhruva/build-with-nommapEdward Thomson2021-01-056-9/+152
|\ \ | | | | | | Build with NO_MMAP
| * | Add github action to build and test with mmap emulationDhruva Krishnamurthy2020-12-301-0/+20
| | |
| * | Support build with NO_MMAP to disable use of system mmapDhruva Krishnamurthy2020-12-305-5/+127
| | | | | | | | | | | | | | | * Use pread/pwrite to avoid updating position in file descriptor * Emulate missing pread/pwrite on win32 using overlapped file IO
| * | Remove broken support for write in emulated mmapDhruva Krishnamurthy2020-12-271-5/+6
| |/ | | | | | | | | | | | | * Emulated mmap based write without pagefault handling is not possible since IO happens outside of call to mmap and data is written to mapped memory * Potential emulation using userfaultfd() might be possible
* | Merge pull request #5748 from lhchavez/chromium-zlibEdward Thomson2021-01-053-3/+115
|\ \ | |/ |/| zlib: Add support for building with Chromium's zlib implementation
| * Use an option instead of a flag for USE_BUNDLED_ZLIBlhchavez2021-01-042-15/+18
| | | | | | | | | | Now `USE_BUNDLED_ZLIB` can be set to the string `Chromium` to enable the Chromium implementation of zlib.
| * zlib: Add support for building with Chromium's zlib implementationlhchavez2020-12-233-4/+113
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change builds libgit2 using Chromium's zlib implementation by invoking cmake with `-DUSE_BUNDLED_ZLIB=ON -DUSE_CHROMIUM_ZLIB=ON`, which is ~10% faster than the bundled zlib for the core::zstream suite. This version of zlib has some optimizations: a) Decompression (Intel+ARM): inflate_fast, adler32, crc32, etc. b) Compression (Intel): fill_window, longest_match, hash function, etc. Due to the introduction of SIMD optimizations, and to get the maximum performance out of this fork of zlib, this requires an x86_64 processor with SSE4.2 and CLMUL (anything Westmere or later, ~2010). The Chromium zlib implementation also supports ARM with NEON, but it has not been enabled in this patch. Performance =========== TL;DR: Running just `./libgit2_clar -score::zstream` 100 times in a loop took 0:56.30 before and 0:50.67 after (~10% reduction!). The bundled and system zlib implementations on an Ubuntu Focal system perform relatively similar (the bundled one is marginally better due to the compiler being able to inline some functions), so only the bundled and Chromium zlibs were compared. For a more balanced comparison (to ensure that nothing regressed overall), `libgit2_clar` under `perf` was also run, and the zlib-related functions were compared. Bundled ------- ```shell cmake \ -DUSE_BUNDLED_ZLIB=ON \ -DUSE_CHROMIUM_ZLIB=OFF \ -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ -DCMAKE_C_FLAGS="-fPIC -fno-omit-frame-pointer" \ -GNinja \ .. ninja perf record --call-graph=dwarf ./libgit2_clar perf report --children ``` ``` Samples: 87K of event 'cycles', Event count (approx.): 75923450603 Children Self Command Shared Objec Symbol + 4.14% 0.01% libgit2_clar libgit2_clar [.] git_zstream_get_output_chunk + 2.91% 0.00% libgit2_clar libgit2_clar [.] git_zstream_get_output + 0.69% 0.00% libgit2_clar libgit2_clar [.] git_zstream_get_output (inlined) 0.17% 0.00% libgit2_clar libgit2_clar [.] git_zstream_init 0.02% 0.00% libgit2_clar libgit2_clar [.] git_zstream_reset 0.00% 0.00% libgit2_clar libgit2_clar [.] git_zstream_eos 0.00% 0.00% libgit2_clar libgit2_clar [.] git_zstream_done 0.00% 0.00% libgit2_clar libgit2_clar [.] git_zstream_free (inlined) Samples: 87K of event 'cycles', Event count (approx.): 75923450603 Children Self Command Shared Objec Symbol + 3.12% 0.01% libgit2_clar libgit2_clar [.] deflate + 2.65% 1.48% libgit2_clar libgit2_clar [.] deflate_slow + 1.60% 0.55% libgit2_clar libgit2_clar [.] inflate + 0.53% 0.00% libgit2_clar libgit2_clar [.] write_deflate 0.49% 0.36% libgit2_clar libgit2_clar [.] inflate_fast 0.46% 0.02% libgit2_clar libgit2_clar [.] deflate_fast 0.19% 0.19% libgit2_clar libgit2_clar [.] inflate_table 0.16% 0.01% libgit2_clar libgit2_clar [.] inflateInit_ 0.15% 0.00% libgit2_clar libgit2_clar [.] inflateInit2_ (inlined) 0.10% 0.00% libgit2_clar libgit2_clar [.] deflateInit_ 0.10% 0.00% libgit2_clar libgit2_clar [.] deflateInit2_ 0.03% 0.00% libgit2_clar libgit2_clar [.] deflateReset (inlined) 0.02% 0.00% libgit2_clar libgit2_clar [.] deflateReset 0.02% 0.00% libgit2_clar libgit2_clar [.] inflateEnd 0.02% 0.00% libgit2_clar libgit2_clar [.] deflateEnd 0.01% 0.00% libgit2_clar libgit2_clar [.] deflateResetKeep 0.01% 0.01% libgit2_clar libgit2_clar [.] inflateReset2 0.01% 0.00% libgit2_clar libgit2_clar [.] deflateReset (inlined) 0.00% 0.00% libgit2_clar libgit2_clar [.] inflateStateCheck (inlined) 0.00% 0.00% libgit2_clar libgit2_clar [.] inflateReset (inlined) 0.00% 0.00% libgit2_clar libgit2_clar [.] inflateStateCheck (inlined) 0.00% 0.00% libgit2_clar libgit2_clar [.] deflateStateCheck (inlined) 0.00% 0.00% libgit2_clar libgit2_clar [.] inflateResetKeep (inlined) ``` Chromium -------- ```shell cmake \ -DUSE_BUNDLED_ZLIB=ON \ -DUSE_CHROMIUM_ZLIB=ON \ -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ -DCMAKE_C_FLAGS="-fPIC -fno-omit-frame-pointer" \ -GNinja \ .. ninja perf record --call-graph=dwarf ./libgit2_clar perf report --children ``` ``` Samples: 97K of event 'cycles', Event count (approx.): 80862210917 Children Self Command Shared Objec Symbol + 3.31% 0.00% libgit2_clar libgit2_clar [.] git_zstream_get_output_chunk + 2.27% 0.01% libgit2_clar libgit2_clar [.] git_zstream_get_output + 0.55% 0.00% libgit2_clar libgit2_clar [.] git_zstream_get_output (inlined) 0.18% 0.00% libgit2_clar libgit2_clar [.] git_zstream_init 0.02% 0.00% libgit2_clar libgit2_clar [.] git_zstream_reset 0.00% 0.00% libgit2_clar libgit2_clar [.] git_zstream_free (inlined) 0.00% 0.00% libgit2_clar libgit2_clar [.] git_zstream_done 0.00% 0.00% libgit2_clar libgit2_clar [.] git_zstream_free Samples: 97K of event 'cycles', Event count (approx.): 80862210917 Children Self Command Shared Objec Symbol + 2.55% 0.01% libgit2_clar libgit2_clar [.] deflate + 2.25% 1.41% libgit2_clar libgit2_clar [.] deflate_slow + 1.10% 0.52% libgit2_clar libgit2_clar [.] inflate 0.36% 0.00% libgit2_clar libgit2_clar [.] write_deflate 0.30% 0.03% libgit2_clar libgit2_clar [.] deflate_fast 0.28% 0.15% libgit2_clar libgit2_clar [.] inflate_fast_chunk_ 0.19% 0.19% libgit2_clar libgit2_clar [.] inflate_table 0.17% 0.01% libgit2_clar libgit2_clar [.] inflateInit_ 0.16% 0.00% libgit2_clar libgit2_clar [.] inflateInit2_ (inlined) 0.15% 0.00% libgit2_clar libgit2_clar [.] deflateInit_ 0.15% 0.00% libgit2_clar libgit2_clar [.] deflateInit2_ 0.11% 0.01% libgit2_clar libgit2_clar [.] adler32_z 0.09% 0.09% libgit2_clar libgit2_clar [.] adler32_simd_ 0.05% 0.00% libgit2_clar libgit2_clar [.] deflateReset (inlined) 0.05% 0.00% libgit2_clar libgit2_clar [.] deflate_read_buf 0.03% 0.00% libgit2_clar libgit2_clar [.] inflateEnd 0.02% 0.00% libgit2_clar libgit2_clar [.] deflateReset 0.01% 0.00% libgit2_clar libgit2_clar [.] deflateEnd 0.01% 0.01% libgit2_clar libgit2_clar [.] inflateReset2 0.01% 0.00% libgit2_clar libgit2_clar [.] inflateReset (inlined) 0.00% 0.00% libgit2_clar libgit2_clar [.] adler32 0.00% 0.00% libgit2_clar libgit2_clar [.] inflateResetKeep (inlined) 0.00% 0.00% libgit2_clar libgit2_clar [.] deflateResetKeep 0.00% 0.00% libgit2_clar libgit2_clar [.] inflateStateCheck (inlined) 0.00% 0.00% libgit2_clar libgit2_clar [.] inflateStateCheck (inlined) 0.00% 0.00% libgit2_clar libgit2_clar [.] inflateStateCheck (inlined) 0.00% 0.00% libgit2_clar libgit2_clar [.] deflateStateCheck (inlined) ```
* Merge pull request #5741 from libgit2/ethomson/ipv6Edward Thomson2020-12-235-40/+469
|\ | | | | Handle ipv6 addresses
| * net: function to identify ipv6 addresses in URLsEdward Thomson2020-12-232-0/+8
| |
| * net: is_default_port is a boolEdward Thomson2020-12-232-3/+3
| |
| * winhttp: handle ipv6 addressesEdward Thomson2020-12-231-15/+27
| |
| * http: handle ipv6 addressesEdward Thomson2020-12-231-10/+30
| |
| * urlparse: use consistent ipv6 address rulesEdward Thomson2020-12-231-230/+109
| | | | | | | | | | | | IPv6 addresses should be used identically internally; we should not denote them with brackets in one operating system and without them in another.
| * urlparse: Add IPv4 and IPv6 based testsPaul Wolfgang (DC-AE/ESF1)2020-12-231-0/+510
| |
* | Merge pull request #5750 from arroz/missing_hostkey_typesEdward Thomson2020-12-233-3/+29
|\ \ | |/ |/| Add support for additional SSH hostkey types.
| * Change libssh2 version to 1.9.0 on focalMiguel Arroz2020-12-211-3/+3
| |
| * Wrap newer hostkeys in #ifdefsMiguel Arroz2020-12-211-0/+6
| | | | | | | | This allows the library to be built using a pre-1.9.0 version of libssh2.
| * Add support for additional hostkey types.Miguel Arroz2020-12-212-0/+20
| | | | | | | | Specifically: ECDSA_256, ECDSA_384, ECDSA_521 and ED25519.
* | Merge pull request #5749 from lhchavez/gcc-10Edward Thomson2020-12-233-8/+12
|\ \ | |/ |/| Fix the `-DENABLE_WERROR=ON` build for gcc 10.2
| * Fix the `-DENABLE_WERROR=ON` build for gcc 10.2lhchavez2020-12-213-8/+12
|/ | | | | | | | | | | | | | | | | This change makes it possible to build with newer versions of gcc without warnings. There were two warnings issued: * gcc 8 added [`-Wstringop-truncation`](https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/), which warns if a call to `strncpy(3)` is prone to accidentally truncating the destination string, since `strncpy(3)` does NOT add a terminating `NULL` if the destination buffer is not large enough to hold the input. This change uses the pattern suggested in https://us-cert.cisa.gov/bsi/articles/knowledge/coding-practices/strncpy-and-strncat to fix the locations flagged by gcc. * There was a potentially uninitialized access of `dest` in `fs_copy`.
* Merge pull request #5746 from libgit2/ethomson/configmapcacheEdward Thomson2020-12-202-6/+9
|\ | | | | repository: use intptr_t's in the config map cache
| * config_cache: cleanup config map lookupEdward Thomson2020-12-201-5/+8
| |
| * repository: use intptr_t's in the config map cacheethomson/configmapcacheEdward Thomson2020-12-201-1/+1
| | | | | | | | | | | | Since we're using atomic primitives to read and write into the config map cache, we need to read/write something pointer-sized. Use an `intptr_t` for the config map cache.
* | Merge pull request #5744 from ↵Edward Thomson2020-12-203-5/+292
|\ \ | | | | | | | | | | | | lhchavez/last-multiply-int64-overflow-change-i-swear Add tests for `git__multiply_int64_overflow`