summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* clone: support sha256ethomson/sha256_experimental-oldEdward Thomson2022-11-238-34/+212
|
* revparse: don't assume SHA1Edward Thomson2022-11-231-6/+13
|
* refdb: teach filesystem refdb about sha256Edward Thomson2022-11-233-48/+78
|
* object: lookup sha256 objectsEdward Thomson2022-11-2326-171/+944
| | | | | This is much of the plumbing for the object database to support SHA256, and for objects to be able to parse SHA256 versions of themselves.
* repo: understand the `objectformat` extensionEdward Thomson2022-11-235-5/+149
| | | | | | Teach the repository about the `objectformat` extension, supporting `sha1` always and `sha256` when the experimental sha256 support is active.
* odb: test sha256 pack backendEdward Thomson2022-11-232-0/+248
|
* packfile: handle sha256 packfilesEdward Thomson2022-11-2317-156/+407
| | | | Teach the packfile machinery to cope with SHA256.
* odb: rename test file to avoid underscoreEdward Thomson2022-11-231-4/+4
| | | | | In clar, an underscore is meaningful; avoid using it incorrectly / unnecessarily.
* tests: add a sha256 repositoryEdward Thomson2022-11-23117-0/+2569
| | | | This is a conversion of the testrepo.git to SHA256 support.
* ci: run sha256 builds during our nightly runsEdward Thomson2022-11-231-1/+31
|
* Merge pull request #6326 from libgit2/ethomson/url_parseEdward Thomson2022-11-238-174/+652
|\ | | | | URL parsing for google-compatible URLs
| * url: only allow @s in usernames for ssh urlsEdward Thomson2022-06-172-3/+15
| | | | | | | | | | | | Enforce the RFC for other protocols; Google's questionable choices about malformed SSH protocols shouldn't impact our ability to properly parse HTTPS.
| * url_parse: introduce our own url parsingEdward Thomson2022-06-173-84/+542
| | | | | | | | | | Provide our own url parser, so that we can handle Google Code's "fun" URLs that have a userinfo with an `@` in it. :cry:
| * url: test that we don't expand % encoding in pathsEdward Thomson2022-06-171-0/+12
| |
| * url: remove invalid scp url parsing testEdward Thomson2022-06-161-4/+0
| | | | | | | | | | | | The url::scp::invalid_addresses test attempts to test an invalid IPv6 address. It does not, it calls the regular URL parsing function which treats it like a possibly invalid scheme.
| * net: move url tests into utilEdward Thomson2022-06-166-86/+86
| |
* | Merge pull request #6429 from csware/safe.directory-wildcardEdward Thomson2022-11-232-1/+79
|\ \ | | | | | | Add support for "safe.directory *"
| * | Add support for "safe.directory *"Sven Strickroth2022-11-192-1/+79
| | | | | | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | Merge pull request #6413 from martinvonz/bsd-2-clauseEdward Thomson2022-11-231-0/+30
|\ \ \ | | | | | | | | add 2-clause BSD license to COPYING
| * | | add 2-clause BSD license to COPYINGMartin von Zweigbergk2022-10-071-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | The `git_fs_path_basename_r()` function in `src/util/fs_path.c` says it's based on Android code using the 2-clause BSD license, so I suppose that means the COPYING file should include that.
* | | | Merge pull request #6416 from slackner/httpclient_update_optionsEdward Thomson2022-11-233-7/+27
|\ \ \ \ | |_|/ / |/| | | http: Update httpclient options when reusing an existing connection.
| * | | http: Update httpclient options when reusing an existing connection.Sebastian Lackner2022-10-203-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Httpclient internally stores a copy of the certificate_check callback and payload. When connecting via HTTPS, and if the server sends back "Connection: close" after the first request, the following request would attempt to re-use the httpclient and call the (now outdated) callback. In particular for pygit2 this is a problem, since callbacks / payloads are only valid for the duration of a libgit2 call, leading to a ffi.from_handle() error and crashing the Python interpreter.
* | | | Merge pull request #6421 from ↵Edward Thomson2022-11-181-2/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | julianmesa-gitkraken/fix-leak-git_tag_create_from_buffer Fix leak in git_tag_create_from_buffer
| * | | | Missing dispose in git_tag_create__internalJulian Mesa2022-11-031-1/+3
| | | | |
| * | | | Missing disposeJulian Mesa2022-11-031-1/+3
| | | | |
| * | | | Fix leak in git_tag_create_from_bufferJulian Mesa2022-11-031-0/+1
| |/ / / | | | | | | | | | | | | If the tag already exists and we are not forcing overwrite we need to free ref_name buffer before return the "tag already exists" error.
* | | | Merge pull request #6408 from kcsaul/fix-safe-directory-not-foundEdward Thomson2022-11-182-8/+11
|\ \ \ \ | | | | | | | | | | Ignore missing 'safe.directory' config during ownership checks
| * | | | repo: ignore missing 'safe.directory' config during ownership checksKevin Saul2022-10-011-0/+3
| | | | |
| * | | | repo: test ownership validation fails with expected errorKevin Saul2022-10-011-8/+8
| | |/ / | |/| |
* | | | Merge pull request #6420 from derrickstolee/commit-graph-hashingEdward Thomson2022-11-183-10/+68
|\ \ \ \ | |_|/ / |/| | | commit-graph: only verify csum on git_commit_graph_open().
| * | | commit_graph: use uint64_t for arithmeticDerrick Stolee2022-11-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should resolve some issues with UBSan builds by using unsigned 64-bit integers for all arithmetic until we finally convert to an offset or size value. Signed-off-by: Derrick Stolee <derrickstolee@github.com>
| * | | commit-graph: only verify csum on git_commit_graph_open().Colin Stolley2022-11-033-7/+65
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is expensive to compute the sha1 of the entire commit-graph file each time we open it. Git only does this if it is re-writing the file. This patch will only verify the checksum when calling the external API git_commit_graph_open(), which explicitly says it opens and verifies the commit graph in the documentation. For internal library calls, we call git_commit_graph_get_file(), which mmaps the commit-graph file in read-only mode. Therefore it is safe to skip the validation check there. Tests were added to check that the validation works in the happy path, and prevents us from opening the file when validation fails. (Note from Derrick Stolee: This patch was applied internally at GitHub after we recognized the performance impact it had during an upgrade of libgit2. The original author left the company before we remembered to send it upstream.) Signed-off-by: Derrick Stolee <derrickstolee@github.com>
* | | benchmark: update pathEdward Thomson2022-10-181-2/+2
|/ / | | | | The path to the default CLI output has changed, update it.
* | Merge pull request #6405 from libgit2/ethomson/experimentalEdward Thomson2022-09-215-7/+59
|\ \ | | | | | | Support non-cmake builds with an in-tree `experimental.h`
| * | cmake: provide empty experimental.h for non-cmake usersEdward Thomson2022-09-193-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | Not everybody builds libgit2 using cmake; provide an `experimental.h` with no experiments configured for those that do not. To support this, we also now create compile definitions for experimental functionality, to supplant that empty `experimental.h`. cmake will continue to generate the proper `experimental.h` file for use with `make install`.
| * | tests: skip sha256 tests when not compiled inEdward Thomson2022-09-192-7/+21
| | | | | | | | | | | | | | | Actually `cl_skip` the sha256 tests when we're not compiled for sha256, instead of passing them.
* | | Merge pull request #6395 from arroz/fix/nonexistent-worktree-lookup-error-codeEdward Thomson2022-09-192-1/+6
|\ \ \ | | | | | | | | #6366: When a worktree is missing, return GIT_ENOTFOUND.
| * | | #6366: When a worktree is missing, return GIT_ENOTFOUND.Miguel Arroz2022-08-302-1/+6
| | | |
* | | | Merge pull request #6369 from torvalds/mainEdward Thomson2022-09-1939-10/+121
|\ \ \ \ | |_|/ / |/| | | Don't fail the whole clone if you can't find a default branch
| * | | clone: test for cloning a repo with namespace scopeEdward Thomson2022-09-192-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | Test that we can successfully clone a repository that is namespace scoped on the remote and does not advertise a HEAD. To do this, we must specify the branch to checkout.
| * | | clone: test bare clone namespaced repo with no HEADEdward Thomson2022-09-1938-9/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Test that we can successfully clone a repository that is namespace scoped to a bare repository locally. We need not specify a checkout branch in this case (obviously, since we do not check anything out in a bare clone).
| * | | clone: narrow success tests on HEAD-less remotesEdward Thomson2022-09-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only allow the remote default branch checking to fail when the remote default branch doesn't exist (`git_remote__default_branch` returns `GIT_ENOTFOUND`). If there was any other type of error - for example, an allocation failure - we should not swallow that and continue to fail. This allows us to support the case when a remote has not advertised a HEAD -- this is possible, for example, when the remote has constrained the caller to a particular namespace. But other remote failures remain as failures.
| * | | Merge remote-tracking branch 'origin/main' into clone_namespaceEdward Thomson2022-09-194-14/+29
| |\ \ \
| * | | | Don't fail the whole clone if you can't find a default branchLinus Torvalds2022-07-291-1/+1
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 6bb358786 ("clone: set refs/remotes/origin/HEAD to default branch when branch is specified, attempt 2") libgit2 was changed to set the default remote branch when one was copied. But it makes update_head_to_branch() return an error if the origin doesn't even *have* a HEAD in the first place, since git_remote_default_branch() will fail. That's entirely wrong, and means that you cannot do "git_clone()" of a particular branch on a remote repository when that remote doesn't have a default branch at all. So don't set the error code. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | Merge pull request #6398 from lrm29/patch-1Edward Thomson2022-09-191-386/+0
|\ \ \ \ | | | | | | | | | | Delete create.c.bak
| * | | | Delete create.c.bakLaurence McGlashan2022-09-061-386/+0
| |/ / /
* | | | Merge pull request #6382 from csware/fix_mem_leakEdward Thomson2022-09-191-3/+3
|\ \ \ \ | | | | | | | | | | Fix memory leak
| * | | | Fix memory leakSven Strickroth2022-08-141-3/+3
| |/ / / | | | | | | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | | Merge pull request #6377 from Vinz2008/mainEdward Thomson2022-09-191-1/+1
|\ \ \ \ | | | | | | | | | | Fixes #6365 : Uppercase windows.h include fails build in case-sensitive OS
| * | | | Fix #6365Vinz20082022-08-111-1/+1
| |/ / /