|
4e85b4fc
|
2022-04-05T22:40:43
|
|
Merge pull request #6259 from libgit2/ethomson/diff_arm32
diff: don't stat empty file on arm32 (flaky test)
|
|
cd8fde82
|
2022-04-05T22:40:28
|
|
Merge pull request #6258 from libgit2/ethomson/sha256_openssl_dynamic
sha256: support dynamically loaded openssl
|
|
d8015d28
|
2022-04-04T13:30:27
|
|
Merge pull request #6251 from libgit2/ethomson/oid_fetch
fetch: support OID refspec without dst
|
|
3bd9bb8d
|
2022-04-04T13:28:40
|
|
sha256: support dynamically loaded openssl
|
|
42093d6a
|
2022-04-04T11:40:42
|
|
diff: don't stat empty file on arm32 (flaky test)
Our CI test infrastructure virtualizes arm32 in docker, which is a
sometimes imperfect situation. In `diff::workdir::can_diff_empty_file`,
avoid the stat to ensure that the file is zero bytes; there is an odd
issue running in qemu when emulating arm32 that we should skip.
|
|
db4461d5
|
2022-03-23T12:45:44
|
|
Merge pull request #6144 from libgit2/ethomson/sha256
SHA256: add a SHA256 implementation backend
|
|
0e30becc
|
2021-12-13T17:49:57
|
|
sha: cast nonsense for obnoxious gcc warnings
gcc (mingw) warns when you cast the result of `GetProcAddress`; cast the
results to `void *` before casting them to the actual result.
|
|
ce78c83b
|
2021-12-13T15:31:21
|
|
sha: ensure we test both cng and cryptoapi on windows
When GIT_SHA1_WIN32 or GIT_SHA256_WIN32 is used, ensure that we test
both CryptoNG ("cng") and CryptoAPI.
|
|
8bc998f4
|
2021-12-12T12:44:13
|
|
sha1: remove generic implementation
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.
|
|
fb6d0181
|
2022-01-22T21:47:03
|
|
---------------------------------
|
|
6a7d5d23
|
2021-12-13T11:54:49
|
|
sha: support Win32 for SHA256
Adding SHA256 support prompted an overdue refactoring of some of the
unnecessary complexity around the CNG/CryptoAPI abstraction.
|
|
6b4a6faa
|
2021-12-12T15:41:47
|
|
sha: support OpenSSL for SHA256
|
|
b3e3fa10
|
2021-12-12T15:34:35
|
|
sha: support mbedTLS for SHA256
|
|
83c27786
|
2021-12-12T15:14:21
|
|
sha: support CommonCrypto for SHA256
|
|
b900981c
|
2021-12-12T14:25:25
|
|
sha: add sha256 algorithm
Add support for a SHA256 hash algorithm, and add the "builtin" SHA256
hash engine (from RFC 6234).
|
|
36df49c2
|
2021-12-12T14:29:11
|
|
sha: GIT_ERROR_SHA1 is deprecated in favor of GIT_ERROR_SHA
The more generic GIT_ERROR_SHA allows for SHA256 errors as well as SHA1.
|
|
c7b189ba
|
2021-12-12T13:19:36
|
|
sha1: refactor folder structure
Eliminate the `sha1` folder, move it down into `hash` so that future
impelmentations can share common code.
|
|
3a08bc43
|
2022-03-23T08:38:23
|
|
Merge pull request #6235 from libgit2/ethomson/cli_benchmarks
Benchmarking suite
|
|
a9a7967a
|
2022-03-22T22:16:57
|
|
fetch: support OID refspec without dst
Support the ability to create a refspec that is a single object ID
without a destination.
|
|
8420ac4b
|
2022-03-22T23:48:38
|
|
Merge pull request #6252 from libgit2/ethomson/bitbucket_clone
clone: update bitbucket tests
|
|
a1020a7f
|
2022-03-22T23:05:48
|
|
clone: update bitbucket tests
|
|
0e530061
|
2022-03-22T21:07:53
|
|
Merge pull request #6246 from bierbaum/wilhelm/fix_extension_validation_string_bug
Fix a string concatenation bug when validating extensions
|
|
ecc722c3
|
2022-03-16T10:25:11
|
|
Fix a string parsing bug when validating extensions from the configuration
As builtin extensions are evaluated in the latter half of `check_valid_extension`, a string `cfg` is concatenated with the static string 'extension.' and the value from `builtin_extension`, before being compared with the configured value. This string is not being cleared while iterating through the names of the extensions. Because there is currently only one extension ('noop'), the bug was never noticible.
This patch corrects the behavior by clearing the string on each iteration, as is done in the first block.
|
|
2a0d0bd1
|
2022-03-02T19:53:14
|
|
Merge pull request #6238 from libgit2/ethomson/coverity
Some minor fixes for issues discovered by coverity
|
|
da0b0354
|
2022-03-02T19:53:04
|
|
Merge pull request #6239 from libgit2/ethomson/cmake_libs
cmake: export libraries needed to compile against libgit2
|
|
4c6eab99
|
2022-02-22T22:03:08
|
|
ci: run benchmark tests nightly
|
|
93037bab
|
2022-02-22T22:00:37
|
|
tests: add benchmark tests
Add a benchmark test suite that wraps hyperfine and is suitable for
producing data about test runs of a CLI or A/B testing CLIs.
|
|
e48bb3b7
|
2022-02-22T21:52:08
|
|
ci: allow for build-time (`cmake --build`) options
Allow for options in the `cmake --build` phase, so that callers can
specify (eg) the config type.
|
|
cfdf36f9
|
2022-02-22T21:49:15
|
|
ci: rename build setup scripts
Rename our build setup scripts to include the `build` name so that we
can add additional CI setup scripts with no ambiguity.
|
|
b08fe71d
|
2022-02-27T23:16:05
|
|
cmake: export libraries needed to compile against libgit2
If users are using us as a direct dependency (via `add_subdirectory`)
then they may want to know the libraries to link to; tell them.
|
|
073e63d0
|
2022-02-27T10:05:24
|
|
object: validate that `odb_obj` was set
|
|
241d838f
|
2022-02-27T10:02:05
|
|
http: skip processing when body is null or 0 length
Mistakenly `&&` when we should have `||`d.
|
|
9f0088c4
|
2022-02-27T09:26:16
|
|
fs_path: exit quickly in `dirname_r` failure
When we encounter a situation where we need to exit, simply `return -1`
instead of trying to set `len = -1` and then jumping to the exit
handler, which would erroneously do work based on the `len` value.
|
|
043a87a0
|
2022-02-27T09:21:53
|
|
refdb: unlock mutex on assertion failure
If we're safely asserting (and returning an error to the caller), we
should still unlock our mutex.
|
|
d9b041e6
|
2022-02-27T09:20:58
|
|
assert: add `ASSERT_WITH_CLEANUP`
Now that we safely assert and return, we may need to be in a place where
we need to unlock mutexes or cleanup resources. Provide
`ASSERT_WITH_CLEANUP` that permits for this behavior by taking a block.
|
|
e32db9f2
|
2022-02-27T08:54:09
|
|
cli: always give a value to `error`
|
|
1327dbcf
|
2022-02-26T15:10:42
|
|
Merge pull request #6133 from libgit2/ethomson/cli_redux
CLI (redux)
|
|
e427d0a1
|
2021-11-30T10:33:24
|
|
cli: add `hash-object` command
Introduce a simple command that emulates `git hash-object`.
|
|
dcabef22
|
2022-02-21T13:06:43
|
|
futils: produce improved error messages
|
|
e7be6b76
|
2021-11-29T12:04:06
|
|
futils: provide an option to read a whole file by fd
|
|
b8771227
|
2021-11-28T10:32:03
|
|
cli: add `cat-file` command
Introduce a simple command that emulates `git cat-file`.
|
|
f8e7d8fd
|
2021-11-26T17:33:38
|
|
cli: support `help <command>`
Support `help <command>` by re-invoking the command itself with the
`--help` argument. This allows us to keep the help logic with the
commands itself.
|
|
c6dd82d9
|
2020-02-23T11:54:33
|
|
cli: introduce a help command
Add a framework for commands to be defined, and add our first one,
"help". When `git2_cli help` is run, the `cmd_help` function will be
invoked with the remaining command line arguments. This allows users to
invoke `git2_cli help foo` to get information about the `foo` subcommand.
|
|
8526cbd5
|
2021-11-26T09:37:29
|
|
opt: use a custom function to print usage
Our argument parser (https://github.com/ethomson/adopt) includes a
function to print a usage message based on the allowed options. Omit
this and use a cutom function that understands that we have subcommands
("checkout", "revert", etc) that each have their own options.
|
|
3a3ab065
|
2020-05-03T23:13:28
|
|
cli: infrastructure for a cli project
Introduce a command-line interface for libgit2. The goal is for it to
be git-compatible.
1. The libgit2 developers can more easily dogfood libgit2 to find bugs,
and performance issues.
2. There is growing usage of libgit2's examples as a client; libgit2's
examples should be exactly that - simple code samples that illustrate
libgit2's usage. This satisfies that need directly.
3. By producing a client ourselves, we can better understand the needs
of client creators, possibly producing a shared "middleware" for
commonly-used pieces of client functionality like interacting with
external tools.
4. Since git is the reference implementation, we may be able to benefit
from git's unit tests, running their test suite against our CLI to
ensure correct behavior.
This commit introduces a simple infrastructure for the CLI.
The CLI is currently links libgit2 statically; this is because the
utility layer is required for libgit2 _but_ shares the error state
handling with libgit2 itself. There's no obviously good solution
here without introducing annoying indirection or more complexity.
Until we can untangle that dependency, this is a good step forward.
In the meantime, we link the libgit2 object files, but we do not include
the (private) libgit2 headers. This constrains the CLI to the public
libgit2 interfaces.
|
|
d02f4f7a
|
2021-11-17T14:31:29
|
|
cmake: refactor `add_clar_test` into separate module
|
|
e6d93612
|
2021-11-16T23:59:43
|
|
refactor: move utility tests into util
|
|
2b09b5d7
|
2021-11-16T23:47:14
|
|
refactor: move headertest into separate test folder
|
|
25bc84fb
|
2021-11-16T23:41:00
|
|
refactor: move clar into separate directory
|
|
3344fddc
|
2021-11-16T23:29:22
|
|
refactor: `tests` is now `tests/libgit2`
Like we want to separate libgit2 and utility source code, we want to
separate libgit2 and utility tests. Start by moving all the tests into
libgit2.
|
|
91ba0896
|
2021-11-15T09:54:00
|
|
cmake: rename git2internal target to libgit2
The `git2internal` target is actually the git library; call it such so
that IDE users have visibility into it.
|
|
d7b49ed4
|
2021-11-15T14:54:17
|
|
cmake: remove unnecessary xcode hack
|
|
5fcfada5
|
2021-11-15T07:45:16
|
|
cmake: document CMakeLists.txt hierarchy
|
|
c3b7ace9
|
2021-11-14T16:43:53
|
|
refactor: make util an object library
Instead of simply including the utility files directly, make them a
cmake object library for easy reusability between other projects within
libgit2.
Now the top-level `src` is responsible for platform selection, while the
next-level `libgit2` and `util` configurations are responsible for
identifying what objects they include.
|
|
ef4ab298
|
2021-11-14T08:47:40
|
|
refactor: `src` is now `src/libgit2`
|
|
49e180c8
|
2022-02-15T22:55:48
|
|
errors: expose `git_error_set`
The `git_error_set` function is useful for callers who implement
backends and advanced callbacks. Expose it.
|
|
c716b9f2
|
2022-02-21T10:16:05
|
|
odb: initialize `object` before use
Newer gcc is complaining about `object` being potentially not
initialized; initialize it.
|
|
eca9e1cf
|
2022-02-22T07:17:12
|
|
Merge pull request #6228 from libgit2/ethomson/win32_systemdirs
win32: `find_system_dirs` does not return `GIT_ENOTFOUND`
|
|
f45121ed
|
2022-02-21T16:13:52
|
|
win32: `find_system_dirs` does not return `GIT_ENOTFOUND`
Allow for no Git for Windows installation. When there is no GfW found
in the path or registry, `git_win32__find_system_dirs` would return a
`GIT_ENOTFOUND`. Callers were not expecting this. Since this is no
error, we simply return `0` so that callers can move on with their
lives.
|
|
1551b1f0
|
2022-02-21T09:06:56
|
|
Merge pull request #6226 from libgit2/cmn/update-tips-error
remote: do store the update_tips callback error value
|
|
e35b5e44
|
2022-02-21T10:34:13
|
|
test: add test for the behaviour of update_tips on error
|
|
15860aa0
|
2022-02-21T10:03:06
|
|
remote: do store the update_tips callback error value
We use `git_error_set_after_callback_function` to determine whether
`update_tips` returned an error but do not store its return value making us
think it always returns 0.
Fix it by adding the common patter of storing it inside the `if` when calling it.
|
|
83f2a20e
|
2022-02-18T09:30:18
|
|
Merge pull request #6220 from libgit2/ethomson/version
meta: update version number to v1.5.0-alpha
|
|
899fd4c5
|
2022-02-18T09:30:05
|
|
Merge pull request #6223 from libgit2/ethomson/xdiff
xdiff: use xdl_free not free
|
|
1afad26e
|
2022-02-18T08:51:24
|
|
Merge pull request #6219 from apnadkarni/patch-2
Free parent and ref in lg2_commit before returning.
|
|
4646f1e3
|
2022-02-18T08:50:53
|
|
Merge pull request #6217 from mgorny/sys-httpparser
cmake: Fix package name for system http-parser
|
|
b722c45d
|
2022-02-17T13:55:34
|
|
xdiff: use xdl_free not free
We've added a lovely abstraction layer in xdiff so that it can call our
allocation functions. But it also needs to call our free functions. We
missed some `free` calls in `xmerge.c`. Update them to use `xdl_free`.
Without this, we will pass a pointer allocated with a custom allocator
to the system free function. :bomb:
|
|
b152b030
|
2022-02-14T10:27:48
|
|
meta: document version information for libgit2
|
|
056fe4be
|
2022-02-14T07:12:36
|
|
meta: provide an accessor for prerelease info
|
|
ae74d5ac
|
2022-02-14T07:01:43
|
|
meta: update version number to v1.5.0-alpha
Update the version number in main to v1.5.0-alpha. This helps people
understand that the main builds are not part of the v1.4.0 release
train.
We use "alpha" to indicate builds out of main (or nightlies) as semver
v2 requires the prerelease component is compared lexicographically.
Thus, our "beta" and "rc" releases should follow.
|
|
aab7c0ba
|
2022-02-14T13:57:07
|
|
Free parent and ref in lg2_commit before returning.
|
|
8bc9eda7
|
2022-02-13T21:23:56
|
|
cmake: Fix package name for system http-parser
Fix building against system http-parser library by fixing
the find_package() argument. It seems to have been accidentally changed
from HTTPParser to HTTP_Parser in de178d36f, effectively making
the build against system library fail to find it:
```
CMake Warning at cmake/SelectHTTPParser.cmake:3 (find_package):
By not providing "FindHTTP_Parser.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"HTTP_Parser", but CMake did not find one.
Could not find a package configuration file provided by "HTTP_Parser" with
any of the following names:
HTTP_ParserConfig.cmake
http_parser-config.cmake
Add the installation prefix of "HTTP_Parser" to CMAKE_PREFIX_PATH or set
"HTTP_Parser_DIR" to a directory containing one of the above files. If
"HTTP_Parser" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
src/CMakeLists.txt:97 (include)
CMake Error at cmake/SelectHTTPParser.cmake:11 (message):
http-parser support was requested but not found
Call Stack (most recent call first):
src/CMakeLists.txt:97 (include)
```
|
|
c8450561
|
2022-02-13T11:55:17
|
|
Merge pull request #6216 from libgit2/ethomson/readme
meta: show build status for v1.3 and v1.4 branches
|
|
9c9405df
|
2022-02-13T11:19:39
|
|
meta: show build status for v1.3 and v1.4 branches
|
|
1d5b9bd8
|
2022-02-13T11:05:40
|
|
Merge pull request #6214 from libgit2/ethomson/v1.4
libgit2 v1.4
|
|
bafd044f
|
2022-02-13T10:07:49
|
|
v1.4: update the changelog
|
|
5c949d1f
|
2022-02-13T10:06:15
|
|
v1.4: update version numbers
|
|
5f66aa26
|
2022-02-13T09:16:09
|
|
Merge pull request #6212 from apnadkarni/patch-1
Fix crashes in example programs on Windows (sprintf_s not compatible with snprintf)
|
|
77ef1a6e
|
2022-02-13T14:11:46
|
|
Update common.h
|
|
4c88b9d3
|
2022-02-12T21:29:43
|
|
release.yml: use sentence case for everything
|
|
aded938e
|
2022-02-12T21:23:01
|
|
Merge pull request #6204 from boretrk/merge_flags
merge: fix overlap between GIT_MERGE_FILE_FAVOR__CONFLICTED and GIT_MERGE_FILE_SIMPLIFY_ALNUM
|
|
d99b4019
|
2022-02-12T14:20:47
|
|
Merge pull request #6211 from libgit2/ethomson/release_config
meta: add a release configuration file
|
|
416f7cb3
|
2022-02-12T10:38:08
|
|
Merge pull request #6208 from jorio/fix-stale-filesize-crash
diff_file: fix crash if size of diffed file changes in workdir
|
|
e3aad1de
|
2022-02-12T10:27:12
|
|
meta: add a release configuration file
Let's let GitHub handle our release notes as much as possible:
https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
|
|
4467bd66
|
2022-02-12T09:09:17
|
|
Merge pull request #6207 from libgit2/ethomson/prng
mktmp: improve our temp file creation
|
|
0fbf62cd
|
2022-02-12T08:46:55
|
|
merge: make the internal flags public
We made the flags that enable recursive merge internal, on the
assumption that nobody would want them and they're hard to reason about.
(Giving people an option that nobody wants is just extra noise.)
However, it made it hard for _us_ to reason about. There's no good
reason to keep it private, let's just make it public and push that
cognitive load onto our poor users. But they should expect it, they're
dealing with git, after all.
|
|
d2ce981f
|
2022-02-11T17:54:34
|
|
diff: fail generation if a file changes size
When we know that we know a file's size, and the file's size changes,
fail.
|
|
359240b6
|
2022-02-11T17:56:05
|
|
diff: indicate when the file size is "valid"
When we know the file size (because we're producing it from a working
directory iterator, or an index with an up-to-date cache) then set a
flag indicating as such. This removes the ambiguity about a 0 file
size, which could indicate that a file exists and is 0 bytes, or that we
haven't read it yet.
|
|
e86e81c5
|
2022-02-12T06:58:05
|
|
oid: make empty tree id global
Move the empty tree ID into a global space so that it can be generally
used.
|
|
e1415dc3
|
2022-02-11T11:02:00
|
|
diff_file: test empty workdir file grows after obtaining a diff
This test was also provided by @jorio
https://github.com/libgit2/libgit2/pull/6208#issuecomment-1034072050
|
|
9aade20b
|
2022-02-09T19:04:52
|
|
diff_file: test workdir file becomes empty after obtaining a diff
|
|
3bac68ff
|
2022-02-09T18:54:34
|
|
diff_file: Apply suggestions from code review
Skip new_file_size non-zero test, custom error message if file changed in workdir
Co-authored-by: Edward Thomson <ethomson@github.com>
|
|
0a0cd67d
|
2022-02-08T20:18:15
|
|
diff_file: fix crash if size of diffed file changes in workdir
"diff_file_content_load_workdir_file()" maps a file from the workdir
into memory. It uses git_diff_file.size to determine the size of the
memory mapping.
If this value goes stale, the mmaped area would be sized incorrectly.
This could occur if an external program changes the contents of the
file after libgit2 had cached its size. This used to segfault if the
file becomes smaller (mmaped area too large).
This patch causes diff_file_content_load_workdir_file to fail without
crashing if it detects that the file size has changed.
|
|
1d811f0e
|
2022-02-11T07:14:54
|
|
Merge pull request #6203 from libgit2/ethomson/fetch_by_oid
Fetch by object id
|
|
b933c14a
|
2022-02-08T12:22:15
|
|
util: remove `p_mktemp` / `p_mkstemp`
We have our own temporary file creation function now in
`git_futils_mktmp`, remove the others since they may be terrible on some
platforms.
|
|
97fade4f
|
2022-02-08T12:19:59
|
|
fs_path: use new mktmp to query unicode support
|
|
53063e77
|
2022-02-07T23:11:11
|
|
futils: use our random function for mktemp
`mktemp` on mingw is exceedingly deficient, using a single monotonically
increasing alphabetic character and the pid. We need to use our own
random number generator for temporary filenames.
|
|
86c58a5b
|
2022-02-07T23:10:38
|
|
str: add hexadigit encoding to strings
|
|
3c53796c
|
2022-02-07T19:38:32
|
|
rand: introduce git_rand PRNG
Introduce `git_rand`, a PRNG based on xoroshiro256**, a fast,
all-purpose pseudo-random number generator: https://prng.di.unimi.it
The PRNG will be seeded by the system's entropy store when possible,
falling back to current time and system data (pid, uptime, etc).
Inspiration for this was taken from libressl, but since our PRNG is
not used for cryptographic purposes (and indeed currently only generates
a unique temp file name that is written in a protected directory),
this should be more than sufficient.
Our implementation of xoroshiro256** was taken almost strictly from
the original author's sources, but was tested against PractRand to
ensure that there were no foolish mistranslations:
```
RNG_test using PractRand version 0.94
RNG = RNG_stdin64, seed = unknown
test set = core, folding = standard (64 bit)
rng=RNG_stdin64, seed=unknown
length= 256 megabytes (2^28 bytes), time= 2.9 seconds
no anomalies in 210 test result(s)
rng=RNG_stdin64, seed=unknown
length= 512 megabytes (2^29 bytes), time= 6.2 seconds
no anomalies in 226 test result(s)
rng=RNG_stdin64, seed=unknown
length= 1 gigabyte (2^30 bytes), time= 12.7 seconds
no anomalies in 243 test result(s)
rng=RNG_stdin64, seed=unknown
length= 2 gigabytes (2^31 bytes), time= 25.4 seconds
no anomalies in 261 test result(s)
rng=RNG_stdin64, seed=unknown
length= 4 gigabytes (2^32 bytes), time= 50.6 seconds
no anomalies in 277 test result(s)
rng=RNG_stdin64, seed=unknown
length= 8 gigabytes (2^33 bytes), time= 104 seconds
no anomalies in 294 test result(s)
```
|
|
d299a7aa
|
2022-02-08T20:42:45
|
|
Merge pull request #6205 from ccstolley/ccs_fix_http_push_timeout
push: Prepare pack before sending pack header.
|