|
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).
|
|
3a08bc43
|
2022-03-23T08:38:23
|
|
Merge pull request #6235 from libgit2/ethomson/cli_benchmarks
Benchmarking suite
|
|
a1020a7f
|
2022-03-22T23:05:48
|
|
clone: update bitbucket tests
|
|
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.
|
|
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.
|
|
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.
|
|
5fcfada5
|
2021-11-15T07:45:16
|
|
cmake: document CMakeLists.txt hierarchy
|
|
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.
|
|
e35b5e44
|
2022-02-21T10:34:13
|
|
test: add test for the behaviour of update_tips on error
|
|
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
|
|
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
|
|
d9863fc1
|
2022-02-06T15:27:34
|
|
Merge pull request #6192 from libgit2/ethomson/sha256_preparation
SHA256: early preparation
|
|
9d88300a
|
2022-02-05T12:35:46
|
|
fetch: support oids in fetch specs
|
|
07264ea7
|
2022-02-06T14:07:36
|
|
fetch: add a test for local fetching
|
|
b82d5664
|
2022-02-05T09:03:37
|
|
oid: introduce git_oid__is_hexstr
Introduce a function that determines whether a given string is a valid
object id (40 chars of hexadigits).
|
|
4efd6563
|
2022-02-03T16:39:26
|
|
Merge pull request #6196 from libgit2/ethomson/at_revparse
revparse: support bare '@'
|
|
61f1e31a
|
2022-02-02T22:35:18
|
|
Merge pull request #6197 from libgit2/ethomson/merge_msg_conflict_comment
merge: comment conflicts lines in MERGE_MSG
|
|
18a477e7
|
2022-02-02T22:35:07
|
|
Merge pull request #6195 from libgit2/ethomson/zdiff3
merge: support zdiff3 conflict styles
|
|
c0297d47
|
2022-01-30T22:38:08
|
|
merge: comment conflicts lines in MERGE_MSG
git has started adding comment markers to its conflict lines in
MERGE_MSG. Match that behavior.
|
|
add2dabb
|
2022-01-30T22:25:59
|
|
revparse: support bare '@'
A bare '@' revision syntax represents HEAD. Support it as such.
|
|
84e1e560
|
2022-01-30T19:22:38
|
|
Merge branch 'boretrk/futils_mktmp'
|
|
aae54d5b
|
2022-01-30T13:43:43
|
|
Merge pull request #6138 from ccstolley/ccs_packedrefs_fast
refs: Speed up packed lookups.
|
|
c629d2a1
|
2022-01-29T21:02:15
|
|
merge: support zdiff3 conflict styles
|
|
70d9bfa4
|
2022-01-22T17:34:36
|
|
packbuilder: use the packfile name instead of hash
Deprecate the `git_packfile_hash` function. Callers should use the new
`git_packfile_name` function which provides a unique packfile name.
|
|
d2458af7
|
2022-01-22T14:19:13
|
|
indexer: use a byte array for checksum
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.
|
|
11ef76a9
|
2022-01-22T13:31:02
|
|
index: use a byte array for checksum
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.
|
|
74471eef
|
2022-01-21T19:11:18
|
|
commit_graph: tests are now `commitgraph`
Underscores in filenames in tests indicate a logical separation - so
`commit_graph` becomes `commit::graph`. Rename it to `commitgraph` to
avoid this.
|
|
475c6eba
|
2022-01-17T17:16:02
|
|
win32: improve impl & tests for system path / g4w interop
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.
|
|
925abee9
|
2022-01-15T20:08:10
|
|
path: introduce git_fs_path_find_executable
Provide a helper function to find an executable in the current process's
PATH.
|
|
ecbb01f5
|
2022-01-17T00:09:13
|
|
win32: test system paths for gvfs compatibility
|
|
d298059e
|
2022-01-17T21:41:12
|
|
Merge pull request #6167 from libgit2/ethomson/scp_urls_with_ports
Support scp style paths with ports
|
|
616628dd
|
2022-01-17T21:39:35
|
|
Merge branch 'main' into typos
|
|
e02e6a5c
|
2022-01-11T10:19:40
|
|
url: introduce git_net_str_is_url
We occasionally need to determine whether a given string is a URL or
something else. (The "something else" may be a git path in a different
format, like scp formatting, which needs to be handled differently.)
|
|
e2bda60a
|
2022-01-10T21:12:13
|
|
url: introduce git_net_url_parse_scp
Provide a mechanism for parsing scp-style paths (eg
`git@github.com:libgit2/libgit2` into the url form
`ssh://git@github.com/libgit2/libgit2`.)
|
|
df4448f2
|
2022-01-10T21:25:05
|
|
online: test with https instead of git protocol
GitHub is removing support for the unauthenticated git protocol; test
with the https protocol.
|
|
8d548222
|
2022-01-14T23:25:27
|
|
tests: verify that futils_mktmp respects umask
|
|
adaa037d
|
2022-01-04T16:18:40
|
|
remote: test honoring configuration option
Test that we honor `http.followRedirects` when set to initial or false.
|
|
515daeaf
|
2022-01-04T06:16:30
|
|
remote: introduce `follow_redirects` connect option
Give callers the ability to select how to handle redirects - either
supporting redirects during the initial connection (so that, for
example, `git.example.com/repo` can redirect to `github.com/example/repo`)
or all/no redirects. This is for compatibility with git.
|
|
342e55ac
|
2021-12-18T10:13:18
|
|
url: optionally allow off-site redirects
In redirect application logic, (optionally) allow off-site redirects.
|
|
9faa9199
|
2022-01-06T07:42:01
|
|
status: don't use `// ...` in tests, use `/* ... */`
|
|
ca9f6b98
|
2022-01-06T07:41:27
|
|
Merge remote-tracking branch 'pr/6159'
|
|
da5385c6
|
2022-01-06T07:39:21
|
|
status: don't use `// ...` in tests, use `/* ... */`
|
|
db3572b7
|
2022-01-06T07:38:07
|
|
Merge pull request #6165 from libgit2/ethomson/includeif
config: handle empty conditional in includeIf
|
|
90df4302
|
2022-01-05T12:18:05
|
|
Fix typos
|
|
83a1e614
|
2022-01-05T09:18:59
|
|
config: handle empty conditional in includeIf
When a config file contains `[includeIf]` (with no condition), we should
treat that as a falsey value. This means that we should properly parse
a config value of `includeIf.path`.
|
|
a3436cde
|
2022-01-01T15:17:08
|
|
#6154 git_status_list_new case insensitive fix
|
|
ef848891
|
2021-12-31T16:40:58
|
|
Add `rename_threshold` to `git_status_options`.
|
|
942cfac1
|
2021-12-23T14:21:23
|
|
worktree: checkout options suggestions from code review
|
|
f9a98f94
|
2021-11-22T15:16:26
|
|
Fix test fail because of memory leak
|
|
1fa8014a
|
2021-11-22T12:07:59
|
|
Update test for `git_str` usage instead of `git_buf`
See commit f0e693b18afbe1de37d7da5b5a8967b6c87d8e53
|
|
8b0ffdcb
|
2021-11-08T17:23:27
|
|
Add test for `git_worktree_add` no checkout
|
|
a50bbba1
|
2021-12-23T15:07:29
|
|
Merge pull request #6142 from libgit2/ethomson/blob_data_is_binary
blob: identify binary content
|
|
05c3d972
|
2021-12-23T15:03:08
|
|
Merge pull request #6124 from csware/config-parsing
Config parsing
|
|
3cca14b3
|
2021-12-23T14:13:34
|
|
Merge pull request #6125 from stforek/git_commit_summary_spaces
git_commit_summary: ignore lines with spaces
|
|
dca31d24
|
2021-12-23T14:12:23
|
|
Merge pull request #6101 from mkhl/fix/instead-of
remotes: fix insteadOf/pushInsteadOf handling
|
|
ab5b3f37
|
2021-12-23T14:09:09
|
|
Merge pull request #6095 from yoichi/better-compatiblity-for-at-time-notation
Better revparse compatibility for at time notation
|
|
c5cd71b2
|
2021-12-23T18:23:34
|
|
cmake: use PROJECT_SOURCE_DIR of CMAKE_SOURCE_DIR
Also applies to *_BINARY_DIR.
This effectively reverts 84083dcc8bd41332ccac9d7b537f3e254d79011c,
which broke all users of libgit2 that use it as a CMake subdirectory
(via `add_subdirectory()`). This is because CMAKE_SOURCE_DIR refers
to the root-most CMake directory, which in the case of
`add_subdirectory()` is a parent project to libgit2 and thus the paths
don't make any sense to the configuration files. Corollary,
CMAKE_SOURCE_DIR only makes sense if the CMake project is always the
root project - which can rarely be guaranteed.
In all honesty, CMake should deprecate and eventually remove
CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR. It's been the source of headaches
and confusion for years, they're rarely useful over
CMAKE_CURRENT_(SOURCE|BINARY)_DIR or PROJECT_(SOURCE|BINARY)_DIR,
and they cause a lot of confusing configuration and source
code layouts to boot.
Any time they are used, they break `add_subdirectory()` almost 100% of
the time, cause confusing error messages, and hide subtle bugs.
|
|
ad7a51d8
|
2021-10-07T13:26:52
|
|
refs: Speed up packed lookups.
Currently ref lookups require loading the entire packed-refs file into
a hashmap in memory. For repos with large numbers of refs this can be
painfully slow.
This patch replaces the existing lookup code and instead mmap()'s the
packed-refs file and performs a binary search to locate the ref entry.
Git uses a similiar approach.
The old hash table codepath is still used for unsorted packed-refs files.
This patch also fixes a minor bug where the "peeled" trait is never
parsed correctly from the packed-refs header.
|
|
4591e76a
|
2021-12-10T15:19:59
|
|
blob: identify binary content
Introduce `git_blob_data_is_binary` to examine a blob's data, instead of
the blob itself. A replacement for `git_buf_is_binary`.
|
|
dff05bc3
|
2021-11-25T11:40:20
|
|
Multiline config values not preserved on saving
(fixes issue #6088)
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
854164a5
|
2021-11-25T11:02:41
|
|
Add more tests for contents
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
433edb54
|
2021-11-25T10:22:22
|
|
Config parsing confused by continuations that start with quotes
(fixes issue #6089)
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
9f03ebd1
|
2021-11-29T13:44:42
|
|
object: introduce a raw content validation function
Users may want to validate raw object content; provide them a function
to do so.
|
|
6fdb1b2f
|
2021-11-30T21:09:57
|
|
Merge pull request #6122 from libgit2/ethomson/cleanup
Minor code cleanups
|
|
1e015088
|
2021-11-25T15:19:17
|
|
git_commit_summary: ignore lines with spaces
Fixes libgit2/libgit2#6065
|
|
7bb206a7
|
2021-11-23T10:12:29
|
|
Merge branch 'main' into better-compatiblity-for-at-time-notation
Conflicts:
src/revparse.c
|
|
f9c4dc10
|
2021-11-22T11:23:50
|
|
Merge pull request #6106 from ammgws/fixtemplateerr
Fix repo init when template dir is non-existent
|
|
84083dcc
|
2021-11-19T08:48:08
|
|
cmake: use CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR
Instead of using the project-specific `libgit2_SOURCE_DIR` and
`libgit2_BINARY_DIR` variables, use `CMAKE_SOURCE_DIR` and
`CMAKE_BINARY_DIR`.
|
|
91365fd8
|
2021-11-22T09:02:38
|
|
sha1: tests should use hashes, not oid computation
The tests that examine sha1 behavior (including collision detection)
should test against the hash functionality directly, not indirectly
using the oid functions.
|
|
fc42c28e
|
2021-11-19T09:36:03
|
|
util: don't include unnecessary system libraries
Remove some unnecessary includes from utility code.
|
|
ea62f546
|
2021-11-14T16:41:11
|
|
utf8: include `utf8.h` in tests
|
|
add30a83
|
2021-11-18T12:36:25
|
|
date: rfc2822 formatting uses a `git_buf` instead of a static string
|
|
b2c40314
|
2021-11-18T12:19:32
|
|
date: make it a proper `git_date` utility class
Instead of `git__date`, just use `git_date`.
|
|
4a54d8e3
|
2021-11-17T07:27:39
|
|
cmake: enable testing at the top level
Ensure that we `enable_testing()` at the top-level CMakeLists.txt or
else we'll need to navigate within the build directory to the correct
place in the hierarchy to run `ctest`. Now we can `ctest` at the
top-level again.
|
|
86685f8f
|
2021-11-16T17:10:08
|
|
cmake: better explain why headertests exists
|
|
7dcc29fc
|
2021-10-22T22:51:59
|
|
Make enum in src,tests and examples C90 compliant by removing trailing comma.
|
|
5221e185
|
2021-10-02T23:54:14
|
|
Add target for testing libgit2 headers
|
|
395b3dc4
|
2021-11-11T22:10:51
|
|
cmake: refactor global variables
Update the global variables `LIBGIT2_OBJECTS` to
`LIBGIT2_DEPENDENCY_OBJECTS` for clarity and consistency.
|
|
bc0d1ad2
|
2021-11-05T03:08:43
|
|
tests: try to init with non-existent template path
|
|
8d2b3110
|
2021-11-11T19:58:49
|
|
tests: include function declarations
|
|
bfdc0971
|
2021-11-11T13:32:00
|
|
test: correct test names
|
|
ca14942e
|
2021-11-11T13:28:08
|
|
tests: declare functions statically where appropriate
|
|
3f024b6d
|
2021-11-11T12:57:44
|
|
clar: declare summary functions as static
|
|
0429894e
|
2021-11-11T12:28:07
|
|
tests: declare trace handler as static
|
|
49f03c03
|
2021-11-11T16:53:33
|
|
tests: include test declarations for old gcc
Older versions of gcc do not believe that we've adequately declared our
test functions. Include `clar_suite.h` conditionally for those old
versions. Do not do this on newer compilers to avoid unnecessary
recompilation of the entire suite when we add or remove a test function.
|
|
cf522050
|
2021-11-11T16:24:37
|
|
clar: emit `clar_suite.h` with test declarations
We may want to have test function declarations; produce a header file
with (only) the test declarations. Update clar to avoid overwriting the
file unnecessarily to avoid bumping timestamps and potentially
recompiling unnecessarily.
|
|
d3a7a352
|
2021-11-06T16:44:07
|
|
cmake: move test enablement into test cmake
|
|
7891660a
|
2021-10-28T14:15:41
|
|
update remote/insteadof tests
we want to test:
- an anonymous repo (a url)
- a named repo with a url
- a named repo with a url and pushurl
and for each of these matching configuration:
- only insteadOf
- only pushInsteadOf
- both insteadOf and pushInsteadOf
this change adds test cases for all of these combinations.
|
|
ceddeed8
|
2021-11-11T15:20:50
|
|
Merge pull request #6104 from libgit2/ethomson/path
path: refactor utility path functions
|
|
1728e27c
|
2021-11-01T18:19:56
|
|
path: length validation respecting core.longpaths
Teach `git_path_is_valid` to respect `core.longpaths`. Add helper
methods to validate length and set the error message appropriately.
|
|
315a43b2
|
2021-11-01T17:37:06
|
|
path: introduce `git_path_str_is_valid`
Add a `git_str` based validity check; the existing `git_path_is_valid`
defers to it.
|
|
dd748dbe
|
2021-11-01T13:04:40
|
|
fs_path: make empty component validation optional
|
|
bef02d3e
|
2021-11-01T10:57:28
|
|
fs_path: introduce `str_is_valid`
Provide a mechanism for users to limit the number of characters that are
examined; `git_fs_path_str_is_valid` and friends will only examine up to
`str->size` bytes.
`git_fs_path_is_valid` delegates to these new functions by passing
`SIZE_MAX` (instead of doing a `strlen`), which is a sentinel value
meaning "look for a NUL terminator".
|