|
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
|
|
07264ea7
|
2022-02-06T14:07:36
|
|
fetch: add a test for local fetching
|
|
9d88300a
|
2022-02-05T12:35:46
|
|
fetch: support oids in fetch specs
|
|
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".
|
|
63e36c53
|
2021-11-01T09:34:32
|
|
path: `validate` -> `is_valid`
Since we're returning a boolean about validation, the name is more
properly "is valid".
|
|
434a4610
|
2021-11-01T09:31:32
|
|
fs_path: `validate` -> `is_valid`
Since we're returning a boolean about validation, the name is more
properly "is valid".
|
|
95117d47
|
2021-10-31T09:45:46
|
|
path: separate git-specific path functions from util
Introduce `git_fs_path`, which operates on generic filesystem paths.
`git_path` will be kept for only git-specific path functionality (for
example, checking for `.git` in a path).
|
|
94cb060c
|
2021-11-08T14:54:09
|
|
Add tests for ODB refresh
Add optional refreshing in the fake backend, and count the number of
refresh calls if enabled.
|
|
f66e7f36
|
2021-10-28T10:25:09
|
|
libgit2_clar is now libgit2_tests
in #6083 the test runner was renamed to libgit2_tests,
but not all references to the old name were updated.
this change changes all of them to use the new name.
|
|
6c0d5366
|
2021-10-22T07:54:12
|
|
Cause error when date parsing is failed
|
|
776a6a8e
|
2021-10-22T00:09:39
|
|
Return the oldest reflog entry on revparse when older time is given
For better compatibility with git command which returns the oldest
log entry with a warning message.
|
|
49ebc8a7
|
2021-10-22T00:08:52
|
|
Add a branch with a empty reflog into testrepo.git
|
|
52693ab4
|
2021-09-26T23:11:13
|
|
cmake: stylistic refactoring
Ensure that we always use lowercase function names, and that we do not
have spaces preceding open parentheses, for consistency.
|
|
4e14d4c6
|
2021-09-26T22:06:49
|
|
cmake: BUILD_CLAR is now BUILD_TESTS
Nobody knows what CLAR is. The test building option should be
`BUILD_TESTS`.
|
|
f0e693b1
|
2021-09-07T17:53:49
|
|
str: introduce `git_str` for internal, `git_buf` is external
libgit2 has two distinct requirements that were previously solved by
`git_buf`. We require:
1. A general purpose string class that provides a number of utility APIs
for manipulating data (eg, concatenating, truncating, etc).
2. A structure that we can use to return strings to callers that they
can take ownership of.
By using a single class (`git_buf`) for both of these purposes, we have
confused the API to the point that refactorings are difficult and
reasoning about correctness is also difficult.
Move the utility class `git_buf` to be called `git_str`: this represents
its general purpose, as an internal string buffer class. The name also
is an homage to Junio Hamano ("gitstr").
The public API remains `git_buf`, and has a much smaller footprint. It
is generally only used as an "out" param with strict requirements that
follow the documentation. (Exceptions exist for some legacy APIs to
avoid breaking callers unnecessarily.)
Utility functions exist to convert a user-specified `git_buf` to a
`git_str` so that we can call internal functions, then converting it
back again.
|
|
31ecaca2
|
2021-09-30T08:11:40
|
|
hash: hash functions operate on byte arrays not git_oids
Separate the concerns of the hash functions from the git_oid functions.
The git_oid structure will need to understand either SHA1 or SHA256; the
hash functions should only deal with the appropriate one of these.
|
|
2a713da1
|
2021-09-29T21:31:17
|
|
hash: accept the algorithm in inputs
|
|
8c29885e
|
2021-09-27T08:57:03
|
|
Merge pull request #6076 from libgit2/ethomson/oidarray_dispose
oidarray: introduce `git_oidarray_dispose`
|