summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* rebase: deprecate signing_cbethomson/commit_create_cbEdward Thomson2021-08-291-1/+6
| | | | | The signing callback should not be used; instead, callers should provide a commit_create_cb, perform the signing and commit creation themselves.
* rebase: introduce git_commit_create_cbEdward Thomson2021-08-291-35/+66
| | | | | | | Introduce a new mechanism for `git_rebase_commit` for callers to customize the experience. Instead of assuming that we produce the commit for them, provide a commit creation callback that allows callers to produce the commit themselves and return the resulting commit id.
* Merge pull request #6008 from boretrk/arrayEdward Thomson2021-08-271-8/+8
|\ | | | | git_array_alloc: return objects of correct type
| * git_array_alloc: return objects of correct typePeter Pettersson2021-08-251-8/+8
| |
* | Merge pull request #5747 from lhchavez/atomic-testsEdward Thomson2021-08-274-52/+109
|\ \ | | | | | | Homogenize semantics for atomic-related functions
| * | Homogenize semantics for atomic-related functionslhchavez2021-08-264-52/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were some subtle semantic differences between the various implementations of atomic functions. Now they behave the same, have tests and are better documented to avoid this from happening again in the future. Of note: * The semantics chosen for `git_atomic_compare_and_swap` match `InterlockedCompareExchangePointer`/`__sync_cal_compare_and_swap` now. * The semantics chosen for `git_atomic_add` match `InterlockedAdd`/`__atomic_add_fetch`. * `git_atomic_swap` and `git_atomic_load` still have a bit of semantic difference with the gcc builtins / msvc interlocked operations, since they require an l-value (not a pointer). If desired, this can be homogenized.
* | | Check if default branch matches refspecAlexander Ovchinnikov2021-08-261-0/+3
| | |
* | | clone: set refs/remotes/origin/HEAD to default branch when branch is ↵Alexander Ovchinnikov2021-08-261-7/+14
| | | | | | | | | | | | specified, attempt 2
* | | Revert "Merge pull request #5775 from libgit2/ethomson/clone_branch"Alexander Ovchinnikov2021-08-261-42/+21
|/ / | | | | | | | | This reverts commit 487f2a8287c4d1d41d39e05ac53d0e50c679d7e9, reversing changes made to c6cf7f0e6927f1b264a7dda2467d70b9f744a01f.
* | Merge pull request #6007 from boretrk/arrayEdward Thomson2021-08-253-8/+9
|\ \ | |/ | | array: check dereference from void * type
| * array: fix dereference from void * typePeter Pettersson2021-08-252-4/+5
| |
| * array: make gcc keep the type of the NULL return valuePeter Pettersson2021-08-251-4/+4
| |
* | Merge pull request #6006 from boretrk/c11-warningsEdward Thomson2021-08-252-10/+10
|\ \ | |/ |/| GCC C11 warnings
| * win32: name the dummy union in GIT_REPARSE_DATA_BUFFERPeter Pettersson2021-08-252-10/+10
| | | | | | | | | | | | | | | | Instead of buf->"typeofbuffer"ReparseBuffer the members will be referenced with buf->ReparseBuffer."typeofbuffer" https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_reparse_data_buffer?redirectedfrom=MSDN calls the union DUMMYUNIONNAME but that looks a bit cluttered.
* | Merge pull request #5802 from lhchavez/git-warn-unused-resultEdward Thomson2021-08-258-17/+52
|\ \ | | | | | | Introduce GIT_WARN_UNUSED_RESULT
| * | formattinglhchavez2021-08-081-4/+4
| | |
| * | Get Win32 builds to buildlhchavez2021-08-082-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the location of `GIT_WARN_UNUSED_RESULT` was causing it to be included _after_ a bunch of other headers (namely `src/vector.h`), which broke the build. This change does two things: * Moves the `GIT_WARN_UNUSED_RESULT` above most of the `$include`s in `src/common.h`. * Stops including `vector.h` from `src/win32/path_w32.c` since the header itself does not use it.
| * | Move GIT_WARN_UNUSED_RESULT from the public to the private APIlhchavez2021-08-081-0/+18
| | |
| * | Handle one more unused variable introduced since the PR startedlhchavez2021-08-081-1/+7
| | |
| * | Be a little bit less aggressive GIT_WARN_UNUSED_RESULTlhchavez2021-08-081-9/+6
| | | | | | | | | | | | | | | Now we're limiting ourselves to only functions that allocate or acquire locks.
| * | Proof-of-concept for a more aggressive GIT_UNUSED()lhchavez2021-08-084-7/+16
| | | | | | | | | | | | | | | | | | This adds a `-Wunused-result`-proof `GIT_UNUSED()`, just to demonstrate that it works. With this, sortedcache.h is now completely `GIT_WARN_UNUSED_RESULT`-annotated!
| * | Introduce GIT_WARN_UNUSED_RESULTlhchavez2021-08-082-14/+20
| | | | | | | | | | | | | | | This change adds the GIT_WARN_UNUSED_RESULT annotation, which makes the compiler warn when a return result is not used. This avoids bugs.
* | | Merge pull request #5950 from boretrk/posixtestEdward Thomson2021-08-256-5/+26
|\ \ \ | |_|/ |/| | open: input validation for empty segments in path
| * | bugfix: don't generate paths with empty segmentsPeter Pettersson2021-08-082-5/+6
| | |
| * | tests: optional test for p_open() with empty path segmentsPeter Pettersson2021-08-084-0/+20
| |/
* | c90/c99: name the unnamed union in git_hash_ctxPeter Pettersson2021-08-252-6/+6
| |
* | openssl: lazily load libraries when dynamically loadingEdward Thomson2021-08-241-6/+53
| | | | | | | | | | Defer dlopen until it's needed when dynamically loading OpenSSL libraries.
* | openssl: dynamically load on macOSEdward Thomson2021-08-241-0/+2
| |
* | ntlmclient: update to ntlmclient 0.9.1Edward Thomson2021-08-241-1/+1
| | | | | | | | The ntlmclient dependency can now dynamically load OpenSSL.
* | openssl: dynamically load libssl and symbols (optionally)Edward Thomson2021-08-249-83/+789
| | | | | | | | | | | | | | | | | | | | Provide an interface around OpenSSL to dynamically load the libraries and symbols, so that users can distribute a libgit2 library that is not linked directly against OpenSSL. This enables users to target multiple distributions with a single binary. This mechanism is optional and disabled by default. Configure cmake with -DUSE_HTTPS=OpenSSL-Dynamic to use it.
* | openssl: separate legacy apiEdward Thomson2021-08-243-188/+249
| | | | | | | | | | Refactor the OpenSSL stream implementation so that the legacy code is better abstracted. This will enable future development.
* | openssl: don't fail when we can't customize allocatorsethomson/openssl_valgrindEdward Thomson2021-08-211-5/+10
| | | | | | | | | | | | | | | | | | | | During valgrind runs, we try to swap out the OpenSSL allocators for our own. This allows us to avoid some unnecessary warnings about usage. Unfortunately, many builds of OpenSSL do not allow you to swap allocators; for example FIPS builds and the builds running in CentOS. Try to swap the allocators, but do not fail when they cannot be customized.
* | sha1dc: remove conditional for <sys/types.h>Peter Pettersson2021-08-181-2/+0
| |
* | Fix LIBGIT2_FILENAME not being passed to the resource compilerJulien Richard2021-08-171-1/+1
| |
* | Merge pull request #5972 from libgit2/ethomson/http_empty_passwordEdward Thomson2021-08-141-2/+6
|\ \ | | | | | | http: don't require a password
| * | http: don't require a passwordethomson/http_empty_passwordEdward Thomson2021-08-051-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Attempt authentication when a username is presented but a password is not; this can happen in particular when users are doing token authentication and specifying the token in the URL itself. For example, `https://token@host/` is a valid URI and should be treated as a username of `token` with an empty password.
* | | Merge pull request #5854 from alexjg/respect-force-flag-in-remote-fetchEdward Thomson2021-08-101-0/+5
|\ \ \ | |_|/ |/| | Respect the force flag on refspecs in git_remote_fetch
| * | skip descendant check if remote ref not foundAlex Good2021-08-051-1/+3
| | |
| * | Merge branch 'main' into respect-force-flag-in-remote-fetchAlex Good2021-06-302-3/+8
| |\ \
| * | | Respect the force flag on refspecs in git_remote_fetchAlex Good2021-06-111-0/+3
| | | |
* | | | cmake: extended futimens checking on macOSethomson/futimensEdward Thomson2021-07-301-1/+1
| | | |
* | | | tests: reset odb backend priorityethomson/odb_tests_priorityEdward Thomson2021-07-302-2/+5
| | | |
* | | | odb: Implement option for overriding of default odb backend priorityTony De La Nuez2021-07-302-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce GIT_OPT_SET_ODB_LOOSE_PRIORITY and GIT_OPT_SET_ODB_PACKED_PRIORITY to allow overriding the default priority values for the default ODB backends. Libgit2 has historically assumed that most objects for long- running operations will be packed, therefore GIT_LOOSE_PRIORITY is set to 1 by default, and GIT_PACKED_PRIORITY to 2. When a client allows libgit2 to set the default backends, they can specify an override for the two priority values in order to change the order in which each ODB backend is accessed.
* | | | Merge branch 'pr/5861'Edward Thomson2021-07-301-3/+13
|\ \ \ \
| * | | | branch: git branch upstream with format format name parameter has been added.Dmitry Lobanov2021-05-181-28/+3
| | | | |
| * | | | branch: git branch upstream functions layouts have been fixed.Dmitry Lobanov2021-05-161-4/+6
| | | | |
| * | | | branch: git branch upstream format enum has been added.Dmitry Lobanov2021-05-161-4/+27
| | | | |
| * | | | branch: git branch upstream functions layouts have been fixed.Dmitry Lobanov2021-05-161-2/+4
| | | | |
| * | | | branch: git branch upstream merge has been exposed.Dmitry Lobanov2021-05-121-0/+8
| | | | |
| * | | | branch: git branch upstream with format has been added.Dmitry Lobanov2021-05-121-2/+2
| | | | |