|
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.
|
|
ecbb01f5
|
2022-01-17T00:09:13
|
|
win32: test system paths for gvfs compatibility
|
|
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.
|
|
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`
|
|
b6449de3
|
2021-09-27T08:39:55
|
|
Merge pull request #6075 from libgit2/ethomson/attr_longpaths
|
|
853ba203
|
2021-09-27T08:39:39
|
|
Merge pull request #6073 from libgit2/ethomson/attr_lookups
|
|
7e7cfe8a
|
2021-09-26T20:20:03
|
|
buf: common_prefix takes a string array
`git_strarray` is a public-facing type. Change
`git_buf_text_common_prefix` to not use it, and just take an array of
strings instead.
|
|
0bd132ab
|
2021-09-26T17:58:08
|
|
oidarray: introduce `git_oidarray_dispose`
Since users are disposing the _contents_ of the oidarray, not freeing
the oidarray itself, the proper cleanup function is
`git_oidarray_dispose`. Deprecate `git_oidarray_free`.
|
|
46508fe6
|
2021-09-26T11:28:47
|
|
attr_file: don't take the `repo` as an arg
The `repo` argument is now unnecessary. Remove it.
|
|
0f4256b8
|
2021-09-24T15:23:34
|
|
repository: improve `hashfile` for absolute paths
When `git_repository_hashfile` is handed an absolute path, it determines
whether the path is within the repository's working directory or not.
This is necessary when there is no `as_path` specified.
If the path is within the working directory, then the given path should
be used for attribute lookups (it is the effective `as_path`). If it is
not within the working directory, then it is _not_ eligible.
Importantly, now we will _never_ pass an absolute path down to attribute
lookup functions.
|
|
efa0d64e
|
2021-09-21T13:19:10
|
|
Merge pull request #6067 from libgit2/ethomson/filter_commit_id
filter: use a `git_oid` in filter options, not a pointer
|
|
90656858
|
2021-09-21T11:28:39
|
|
filter: use a `git_oid` in filter options, not a pointer
Using a `git_oid *` in filter options was a mistake; it is a deviation
from our typical pattern, and callers in some languages that GC may need
very special treatment in order to pass both an options structure and a
pointer outside of it.
|
|
470acc71
|
2021-09-21T11:01:27
|
|
rebase: fix (deprecated) signing test
|
|
ba01547d
|
2021-09-20T21:45:10
|
|
Merge pull request #6061 from libgit2/ethomson/email
Introduce `git_email_create`; deprecate `git_diff_format_email`
|
|
bfdba8ee
|
2021-09-20T12:19:48
|
|
Merge branch 'sathieu/patch-1' into main
|
|
8e762124
|
2021-09-20T12:19:05
|
|
httpproxy: move empty string test above config
The configuration change will override the environment variable, so the
environment variable check needs to come first.
|
|
005c740b
|
2021-09-20T14:06:09
|
|
win32: ensure content filtering occurs in longpath test
|
|
482e3853
|
2021-09-20T14:06:50
|
|
Merge remote-tracking branch 'mathworks/longpath_filter_bug' into main
|
|
0644c2e8
|
2021-09-20T08:39:46
|
|
Merge pull request #6058 from mathworks/proxy_config_with_detached_remote
Allow proxy options when connecting with a detached remote.
|
|
ba3595af
|
2021-09-13T16:25:00
|
|
diff: deprecate diff_format_email
`git_diff_format_email` is deprecated in favor of `git_email_create`.
|
|
67b1d019
|
2021-09-14T09:49:31
|
|
email: include renames by default
`git format-patch` includes diffs with rename detection enabled by
default when creating emails. Match this behavior.
|
|
323f222f
|
2021-09-14T09:44:52
|
|
email: include binary diffs by default
`git format-patch` includes binary diffs by default when creating
emails. Match this behavior.
|