summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* huhethomson/smartrefactorEdward Thomson2023-04-114-271/+225
|
* http: add SSPI authentication on WindowsEdward Thomson2023-03-213-4/+345
| | | | | Add support for SSPI on Windows, which offers NTLM and Negotiate authentication.
* utf8: add conversion with size and refactor namesEdward Thomson2023-03-2110-115/+180
| | | | | | | | Add functions to use convert a string with length, instead of assuming NUL termination. In addition, move the utf8 to 16 conversion routines into the `git_utf8` namespace instead of using namespaceless `git__` prefixed names.
* http: refactor GSSAPI / negotiate / NTLM authEdward Thomson2023-03-213-46/+46
| | | | | | | | | | Name the GSSAPI and ntlmclient authentication providers as such. Today they're named after the authentication mechanism ("Negotiate", "NTLM") instead of their implementation. If we have competing implementations for the same mechanism (eg, a future Windows SSPI-based provider for Negotiate and NTLM) then this will get confusing.
* http: introduce schannel streams for windowsEdward Thomson2023-03-218-35/+807
| | | | | | | | | | Provide a stream interface for Schannel - the native crypto APIs - on Windows. This allows Windows to use the same HTTP transport that all the other platforms use, with its own native crypto. Ultimately this allows us to deprecate WinHTTP and we need not add support for our socket changes in two places (our HTTP stack and the WinHTTP stack).
* pack: cast to uint64_t when calculating index size insteadCarlos Martín Nieto2023-03-161-4/+3
| | | | | | It is a bit too hidden why we want 64 bits when we're assigning to a 32-bit integer later on to store the number of objects, so go back to uint32_t and cast to uint64_t during the size calculation.
* pack: use 64 bits for the number of objectsCarlos Martín Nieto2023-03-141-4/+4
| | | | | Keeping it as a 32-bit value means the min size calculation overflows or gets truncated which can lead to issues with large packfiles.
* cmake: don't include `include/git2`Edward Thomson2023-03-103-3/+0
| | | | | Including the `include/git2` build path is a seemingly unnecessary oversight to include the generated `experimental.h` file.
* sysdir: Do not declare win32 functions on non-win32 platformsNicolas Cavallari2023-03-081-0/+2
| | | | | These declaration poses problems on some embedded or retro Linux systems that deliberately disable support for wchar_t from their libc.
* index: support `git_index_add_all` directories with forceEdward Thomson2023-03-021-1/+2
| | | | | | | When the contents of an entire new directory is ignored, and `FORCE` is specified to `git_index_add_all`, ensure that we expand the entire file list. By default, diff will coalesce a fully ignored folder into a single diff entry; expand it.
* Merge pull request #6520 from libgit2/ethomson/git_odb_openEdward Thomson2023-03-021-0/+19
|\ | | | | odb: restore `git_odb_open`
| * odb: restore `git_odb_open`Edward Thomson2023-03-011-0/+19
| | | | | | | | | | `git_odb_open` was erroneously removed during a refactoring; add it back.
* | Remove unused wditer variableYuriy Chernyshov2023-02-281-2/+0
|/ | | Found this randomly while debugging #6517
* Merge pull request #6514 from libgit2/ethomson/libgit2_pcEdward Thomson2023-02-271-2/+2
|\
| * meta: configure pkg-config .pc correctlyEdward Thomson2023-02-271-2/+2
| | | | | | | | | | The library name is correctly libgit2 (not git2) or libgit2-experimental depending on configuration.
* | Merge pull request #6512 from libgit2/ethomson/odb_looseEdward Thomson2023-02-271-0/+34
|\ \
| * | odb: add back git_odb_backend_looseEdward Thomson2023-02-271-0/+34
| |/ | | | | | | | | `git_odb_backend_loose` was erroneously removed during a refactoring; add it back.
* | Merge pull request #6511 from libgit2/ethomson/hostandportEdward Thomson2023-02-271-11/+3
|\ \ | |/ |/| Revert #6503
| * Revert "Pass hostkey & port to host verify callback"Edward Thomson2023-02-271-11/+3
| | | | | | | | This reverts commit f68b40c0af9c7c5c2c8740fe4a8fbcba367e0087.
* | remote: always populate old id in update tipsEdward Thomson2023-02-251-1/+1
|/ | | | | In b1e83cca1bbc255627950b4e8d4fdb1174bf7a12 we erroneously stopped setting the old ID to zero; correct that.
* Pass hostkey & port to host verify callbackFrancois-Xavier Coudert2023-02-241-3/+11
| | | | Co-authored-by: Stefan Karpinski <stefan@karpinski.org>
* net: parse urls or scp style paths in the same functionEdward Thomson2023-02-243-11/+20
|
* odb: don't unconditionally add oid_type to streamEdward Thomson2023-02-231-0/+2
| | | | | | `git_odb_stream` should have an `oid_type` to disambiguate; that's not necessary on non-experimental SHA256 builds. Avoid unnecessary ABI breakage for consumers and hide it behind an ifdef for now.
* Make failure to connect to ssh-agent non-fatalFrancois-Xavier Coudert2023-02-221-1/+3
| | | | | | | | | Fixes https://github.com/libgit2/libgit2/issues/3866 Has been applied in all Julia builds since 2017: https://github.com/JuliaLang/julia/pull/17459 Authored-by: Keno Fischer <kfischer@college.harvard.edu>
* Merge pull request #6493 from libgit2/ethomson/ownershipEdward Thomson2023-02-202-7/+43
|\ | | | | Handle Win32 shares
| * repo: support safe.directory with %(prefix)/Edward Thomson2023-02-201-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git for Windows does some truly bizarre things with paths that start with a forward slash; and expects you to escape that with `%(prefix)`. This syntax generally means to add the prefix that Git was installed to -- eg `/usr/local` -- unless it's an absolute path, in which case the leading `%(prefix)/` is just removed. And Git for Windows expects you to use this syntax for absolute Unix-style paths (in "Git Bash" or Windows Subsystem for Linux). Worse, the behavior used to be that a leading `/` was not absolute. It would indicate that Git for Windows should add the prefix. So `//` is required for absolute Unix-style paths. Yes, this is truly horrifying. Emulate that behavior, I guess, but only for absolute paths. We won't deal with the Git install prefix. Also, give WSL users an escape hatch where they don't have to think about this and can use the literal path that the filesystem APIs provide (`//wsl.localhost/...`).
| * repo: don't fail on strange win32 pathsEdward Thomson2023-02-182-1/+4
| | | | | | | | | | | | | | With some paths on Win32, we cannot identify the owner because it's on a file share (WSL2 or UNC). In that case, don't fail, but identify that the current user does not own the path. This matches Git for Windows behavior.
* | Deleted unused variable.Miguel Arroz2023-02-171-1/+0
| |
* | #6491: Sets oid_type on repos open with git_repository_open_bareMiguel Arroz2023-02-171-22/+48
|/
* stash: update strarray usageEdward Thomson2023-02-161-0/+1
|
* Merge pull request #6330 from gitkraken-jacobw/partial-stashingEdward Thomson2023-02-161-26/+200
|\ | | | | stash: partial stash specific files
| * stash: fixes from code reviewEdward Thomson2023-02-161-40/+33
| |
| * stash: add `const` to argumentsJacob Watson2022-07-141-4/+4
| |
| * stash: better option validation for stash saveJacob Watson2022-07-141-6/+17
| |
| * stash: implement partial stashing by pathJacob Watson2022-07-141-25/+195
| |
* | strarray: remove deprecated declarationEdward Thomson2023-02-164-1/+28
| | | | | | | | | | | | `git_strarray_copy` is deprecated (and has been included in `deprecated.h` for some time). It should not have remained in the public `strarray.h`. Remove it.
* | socket: mark flags as unusedEdward Thomson2023-02-151-1/+2
| |
* | clone: clean up options on failureEdward Thomson2023-02-141-1/+1
| |
* | Merge pull request #6456 from libgit2/ethomson/sha256_experimentalEdward Thomson2023-02-1440-414/+1158
|\ \ | | | | | | SHA256: more SHA256 support
| * | clone: free connect optsEdward Thomson2023-02-122-0/+9
| | |
| * | repo: take an oid_type when initializingEdward Thomson2023-02-121-3/+15
| | |
| * | repo: dump backends on oid type changeEdward Thomson2023-02-121-1/+18
| | |
| * | transport: teach transports about oid types and SHA256Edward Thomson2023-02-1212-83/+286
| | |
| * | clone: support sha256Edward Thomson2023-02-123-22/+109
| | |
| * | revparse: don't assume SHA1Edward Thomson2023-02-121-6/+13
| | |
| * | refdb: teach filesystem refdb about sha256Edward Thomson2023-02-123-48/+78
| | |
| * | object: lookup sha256 objectsEdward Thomson2023-02-1216-110/+261
| | | | | | | | | | | | | | | 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.
| * | packfile: handle sha256 packfilesEdward Thomson2023-02-129-138/+238
| | | | | | | | | | | | Teach the packfile machinery to cope with SHA256.
| * | repo: don't overwrite repo format version on reinitEdward Thomson2023-02-121-8/+16
| | | | | | | | | | | | | | | Ensure that we maintain the `core.repositoryFormatVersion` value instead of always overwriting it with the default.
| * | repo: internal setter for `objectformat`Edward Thomson2023-02-122-0/+38
| | | | | | | | | | | | | | | Provide an internal function to set the repository's `objectformat`, both in the internal object and in the configuration.