| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
The multi-pack index uses raw object IDs, use a raw type for them.
|
|
|
|
|
| |
The index contains entries with raw oids, use a raw oid type for the
raw entry data.
|
|
|
|
|
| |
A packfile contains arrays of raw oids, use a raw oid type to index into
them.
|
|
|
|
|
| |
The commit graph consists of raw oids in an array; use the `git_oid_raw`
type to access them.
|
| |
|
| |
|
|
|
|
|
| |
We will talk about "raw" oids as untyped blobs of data; use a name for
the comparison function that is in keeping with that.
|
|
|
|
| |
Create an object id from raw data instead of casting.
|
|
|
|
| |
Don't write the object id structure, write its raw oid data.
|
|
|
|
|
| |
We explicitly want to write on the id data, not the beginning of the
object data, which may contain other information in the future.
|
|
|
|
|
| |
We explicitly want to hash on the id data, not the beginning of the
object data, which may contain other information in the future.
|
|
|
|
|
| |
Don't assume that a `git_oid` is a particular size; allocate
`sizeof(git_oid)` instead.
|
|
|
|
|
|
|
|
|
|
|
|
| |
A tree entry previously pointed directly into the object id within the
tree object itself; this is useful to avoid any unnecessary memory copy
(and an unnecessary use of 40 bytes per tree entry) but difficult if we
change the underlying `git_oid` object to not simply be a raw object id
but have additional structure.
This commit moves the `git_oid` directly into the tree entry; this
simplifies the tree entry creation from user data. We now copy the
`git_oid` into place when parsing.
|
| |
|
|
|
|
|
| |
gcc (mingw) warns when you cast the result of `GetProcAddress`; cast the
results to `void *` before casting them to the actual result.
|
|
|
|
|
| |
When GIT_SHA1_WIN32 or GIT_SHA256_WIN32 is used, ensure that we test
both CryptoNG ("cng") and CryptoAPI.
|
|
|
|
|
| |
Adding SHA256 support prompted an overdue refactoring of some of the
unnecessary complexity around the CNG/CryptoAPI abstraction.
|
| |
|
| |
|
| |
|
|
|
|
| |
The more generic GIT_ERROR_SHA allows for SHA256 errors as well as SHA1.
|
|
|
|
|
| |
Add support for a SHA256 hash algorithm, and add the "builtin" SHA256
hash engine (from RFC 6234).
|
|
|
|
|
| |
Eliminate the `sha1` folder, move it down into `hash` so that future
impelmentations can share common code.
|
|
|
|
|
|
| |
Remove the "generic" implementation; it should never be used; it only
existed for a no-dependencies configuration, and our bundled sha1dc
satisfies that requirement _and_ is correct.
|
| |
|
|
|
|
|
| |
Deprecate the `git_packfile_hash` function. Callers should use the new
`git_packfile_name` function which provides a unique packfile name.
|
|
|
|
|
|
|
|
| |
The index's checksum is not an object ID, so we should not use the
`git_oid` type. Use a byte array for checksum calculation and storage.
Deprecate the `git_indexer_hash` function. Callers should use the new
`git_indexer_name` function which provides a unique packfile name.
|
|
|
|
|
|
|
|
|
|
|
| |
The index's checksum is not an object ID, so we should not use the
`git_oid` type. Use a byte array for checksum calculation and storage.
Deprecate the `git_index_checksum` function without a replacement. This
is an abstraction that callers should not care about (and indeed do not
seem to be using).
Remove the unused `git_index__changed_relative_to` function.
|
| |
|
| |
|
| |
|
|
|
|
| |
A simple hash-to-hexadigit formatter.
|
|
|
|
|
|
| |
The `git_oid_tostr_s` helper is indeed helpful, unless you are using
printf debugging (by inserting more `git_oid_tostr_s` calls) shortly
after using it. Avoid it before invoking complex functions.
|
|
|
|
|
|
| |
Underscores in filenames in tests indicate a logical separation - so
`commit_graph` becomes `commit::graph`. Rename it to `commitgraph` to
avoid this.
|
|\
| |
| | |
diff_driver: split global_drivers array into separate elements
|
| |
| |
| |
| |
| | |
C99 doesn't allow structures with flexible length array to be
placed in an array.
|
|\ \
| |/
|/| |
win32: update git for windows compatibility
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We look for a Git for Windows installation to use its git config,
so that clients built on libgit2 can interoperate with the Git for
Windows CLI (and clients that are built on top of _it_).
Look for `git` both in the `PATH` and in the registry. Use the _first_
git install in the path, and the first git install in the registry.
Look in both the `etc` dir and the architecture-specific `etc` dirs
(`mingw64/etc` and `mingw32/etc`) beneath the installation root.
Prefer the git in the `PATH` to the git location in the registry so that
users can override that.
Include more tests for this behavior.
|
| |
| |
| |
| |
| | |
Provide a helper function to find an executable in the current process's
PATH.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
With Git for Windows >= 2 the share folder is in an architecture specific subfolder.
This also add support for Git for Windows versions between 2 and 2.24 where also the etc folder is in an architecture specific subfolder.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
| |
| |
| |
| | |
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
git.exe was found
Removal of the last 4 chars is only required for Git for Windows installations in order to find the "root" folder of the Git installation.
Fixes issue #5127.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
| |
| |
| |
| |
| |
| | |
Could happen if the path to git.exe is near to MAX_PATH and we append a longer subdir such as "share/git-core" to it.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|\ \
| |/
|/| |
Improve documentation
|
| | |
|
| | |
|
| | |
|