|
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>
|
|
f9c4dc10
|
2021-11-22T11:23:50
|
|
Merge pull request #6106 from ammgws/fixtemplateerr
Fix repo init when template dir is non-existent
|
|
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
|
|
ca14942e
|
2021-11-11T13:28:08
|
|
tests: declare functions statically where appropriate
|
|
8d2b3110
|
2021-11-11T19:58:49
|
|
tests: include function declarations
|
|
bfdc0971
|
2021-11-11T13:32:00
|
|
test: correct test names
|
|
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
|
|
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.
|
|
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.
|
|
3f13d2e8
|
2021-09-13T10:36:48
|
|
email: allow `git_diff_commit_as_email` to take 0 as patch index
Allow a `0` patch index and `0` patch count; in this case, simply don't
display these in the email.
|
|
6aa34966
|
2021-09-13T08:17:21
|
|
email: introduce `git_email_create_from_diff`
Introduce a function to create an email from a diff and multiple inputs
about the source of the diff.
Creating an email from a diff requires many more inputs, and should be
discouraged in favor of building directly from a commit, and is thus in
the `sys` namespace.
|
|
75d4676a
|
2021-09-12T17:06:14
|
|
email: introduce `git_email_create_from_commit`
Create `git_email_*` which will encapsulate email creation and
application, and `git_email_create_from_commit` in particular, which
creates an email for a single commit.
|
|
e994299f
|
2021-09-16T11:53:32
|
|
Update formatting.
|
|
eb41276f
|
2021-09-16T11:44:04
|
|
Allow proxy options when connecting with a detached remote.
|
|
516f7519
|
2021-09-09T15:08:36
|
|
Add test for revert+rename bug.
|
|
0d30e7bb
|
2021-09-14T13:07:33
|
|
Apply suggestions from code review
Co-authored-by: Edward Thomson <ethomson@github.com>
|
|
4f24a932
|
2021-09-14T07:45:50
|
|
Merge pull request #6031 from libgit2/ethomson/extensions
Support custom git extensions
|
|
6cf9a0b3
|
2021-09-14T12:34:45
|
|
Refactor shared code in longpath test.
|
|
26bf94c0
|
2021-09-14T12:19:54
|
|
If longpaths is true and filters are enabled, pass git_repository through the filtering code to ensure the cached longpath setting is returned.
Fixes: #6054
|
|
31e32ddf
|
2021-09-14T09:34:25
|
|
Add test to ensure empty proxy env behaves like unset env
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
|
|
5eab4daf
|
2021-09-09T21:51:52
|
|
Add test config parsing
This tests parsing a multiline string containing multiple quoted comment
chars. See #6019
|
|
a24e656a
|
2021-09-04T10:16:41
|
|
common: support custom repository extensions
Allow users to specify additional repository extensions that they want
to support. For example, callers can specify that they support
`preciousObjects` and then may open repositories that support
`extensions.preciousObjects`.
Similarly, callers may opt out of supporting extensions that the library
itself supports.
|
|
2f3074da
|
2021-09-03T17:03:00
|
|
repo: refactor extensions tests into their own file
|
|
3c0f14cc
|
2021-09-01T20:34:28
|
|
remote: refactor proxy detection
Update the proxy detection for a remote.
1. Honor `http.<url>.proxy` syntax for a remote's direct URL and
parent URLs.
2. Honor an empty configuration URL to override a proxy configuration.
Add tests to ensure that configuration specificity is honored.
|
|
9e98e443
|
2021-08-31T22:01:34
|
|
url: introduce `git_net_url_matches_pattern_list`
Provide a utility method on a url to determine if it matches any pattern
in a comma-separated list, similar to what one would find in `NO_PROXY`
environment variables.
|
|
e5ba0a3c
|
2021-08-31T20:41:45
|
|
url: introduce `git_net_url_matches_pattern`
Provide a method to determine if a given URL matches a host:port pattern
like the ones found in `NO_PROXY` environment variables.
|
|
3680f0bf
|
2021-08-31T09:41:14
|
|
tests: create the network::url test hierarcy
|
|
1196de4f
|
2021-08-31T15:22:44
|
|
util: introduce `git__strlcmp`
Introduce a utility function that compares a NUL terminated string to a
possibly not-NUL terminated string with length. This is similar to
`strncmp` but with an added check to ensure that the lengths match (not
just the `size` portion of the two strings).
|
|
e5a32774
|
2021-02-11T22:53:16
|
|
Add NO_PROXY env support
Item 2 of 3 from #4164
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
|
|
98be5a11
|
2021-08-30T17:55:47
|
|
Merge branch 'cgraph-write' into main
|
|
b16a36e1
|
2021-08-29T22:53:49
|
|
Merge pull request #6011 from libgit2/ethomson/filter_apply
filter: filter drivers stop taking git_buf as user input
|
|
258115db
|
2021-08-29T22:53:38
|
|
Merge pull request #6016 from libgit2/ethomson/commit_create_cb
Introduce `create_commit_cb`, deprecate `signing_cb`
|
|
16a2e667
|
2021-08-29T22:53:28
|
|
Merge pull request #6012 from libgit2/ethomson/custom_url
remote: introduce remote_ready_cb, deprecate resolve_url callback
|
|
9f84003c
|
2021-08-29T22:34:19
|
|
Merge pull request #6009 from libgit2/ethomson/custom_cert_locations
opts: test GIT_OPT_SET_SSL_CERT_LOCATIONS
|
|
0e047268
|
2021-08-25T18:01:34
|
|
opts: test GIT_OPT_SET_SSL_CERT_LOCATIONS
Include a self-signed certificate for test.libgit2.org:1443 that we can
use to verify that GIT_OPT_SET_SSL_CERT_LOCATIONS works.
|
|
7d9ebdc8
|
2021-08-29T18:50:49
|
|
Merge remote-tracking branch 'origin/main' into cgraph-write
|
|
2998a84a
|
2021-08-29T21:49:33
|
|
Merge pull request #5841 from J0Nes90/features/checkout-dry-run
Checkout dry-run
|
|
c3512fe6
|
2021-08-29T21:35:40
|
|
Merge branch 'main' into multi-pack-index-odb-write
|
|
78cd7624
|
2021-08-29T21:30:51
|
|
Merge pull request #5404 from lhchavez/multi-pack-index-write
midx: Add a way to write multi-pack-index files
|
|
7442c000
|
2021-08-27T11:25:51
|
|
remote: deprecate resolve_url callback
Using a callback to set a resolve_url is not particularly idiomatic.
Deprecate it in favor of the `set_instance_url` and
`set_instance_pushurl` functions which can now be called from the
`git_remote_ready_cb` callback.
|
|
72df17c6
|
2021-08-27T10:59:51
|
|
remote: introduce git_remote_ready_cb
Introduce a new callback that fires when the remote is ready to connect.
|
|
ef03e150
|
2021-08-29T10:14:01
|
|
rebase: deprecate signing_cb
The signing callback should not be used; instead, callers should provide
a commit_create_cb, perform the signing and commit creation themselves.
|
|
d3bdf33b
|
2021-08-29T09:36:01
|
|
rebase: introduce git_commit_create_cb
Introduce a new mechanism for `git_rebase_commit` for callers to
customize the experience. Instead of assuming that we produce the
commit for them, provide a commit creation callback that allows callers
to produce the commit themselves and return the resulting commit id.
|
|
d17e67e6
|
2021-08-29T12:19:49
|
|
tests: change comments to c89 style
|
|
c089d5ac
|
2021-08-27T16:51:38
|
|
filter: use streaming filters in tests
|
|
67240677
|
2021-05-14T00:33:08
|
|
remote: introduce set_instance_url
Users may want to override the URL on a particular instance of a remote,
instead of updating the configuration. Previously, users could use a
callback to do this, but this is not particularly idiomatic.
|
|
34e685c0
|
2021-08-27T08:28:01
|
|
Merge pull request #5747 from lhchavez/atomic-tests
Homogenize semantics for atomic-related functions
|
|
ea285904
|
2020-02-18T00:02:13
|
|
midx: Introduce git_odb_write_multi_pack_index()
This change introduces git_odb_write_multi_pack_index(), which creates a
`multi-pack-index` file from all the `.pack` files that have been loaded
in the ODB.
Fixes: #5399
|
|
9d117e38
|
2020-02-17T21:28:13
|
|
midx: Add a way to write multi-pack-index files
This change adds the git_midx_writer_* functions to allow to
write and create `multi-pack-index` files from `.idx`/`.pack` files.
Part of: #5399
|
|
e66545e3
|
2021-08-27T04:06:54
|
|
Merge remote-tracking branch 'origin/main' into multi-pack-index-write
|
|
47c70fc5
|
2021-08-26T05:40:20
|
|
Merge remote-tracking branch 'origin/main' into cgraph-write
|
|
74708a81
|
2020-12-20T12:45:01
|
|
Homogenize semantics for atomic-related functions
There were some subtle semantic differences between the various
implementations of atomic functions. Now they behave the same, have
tests and are better documented to avoid this from happening again in
the future.
Of note:
* The semantics chosen for `git_atomic_compare_and_swap` match
`InterlockedCompareExchangePointer`/`__sync_cal_compare_and_swap` now.
* The semantics chosen for `git_atomic_add` match
`InterlockedAdd`/`__atomic_add_fetch`.
* `git_atomic_swap` and `git_atomic_load` still have a bit of semantic
difference with the gcc builtins / msvc interlocked operations, since
they require an l-value (not a pointer). If desired, this can be
homogenized.
|
|
63f08e42
|
2021-08-26T05:29:34
|
|
Make the defaultable fields defaultable
Also, add `git_commit_graph_writer_options_init`!
|
|
6bb35878
|
2021-02-08T00:49:21
|
|
clone: set refs/remotes/origin/HEAD to default branch when branch is specified, attempt 2
|
|
8643b524
|
2021-02-08T00:40:50
|
|
Revert "Merge pull request #5775 from libgit2/ethomson/clone_branch"
This reverts commit 487f2a8287c4d1d41d39e05ac53d0e50c679d7e9, reversing
changes made to c6cf7f0e6927f1b264a7dda2467d70b9f744a01f.
|
|
c7a195a1
|
2021-08-25T14:11:03
|
|
Merge pull request #6006 from boretrk/c11-warnings
GCC C11 warnings
|
|
4bbe5e6e
|
2021-08-25T18:14:10
|
|
win32: name the dummy union in GIT_REPARSE_DATA_BUFFER
Instead of buf->"typeofbuffer"ReparseBuffer the members will be
referenced with buf->ReparseBuffer."typeofbuffer"
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_reparse_data_buffer?redirectedfrom=MSDN
calls the union DUMMYUNIONNAME but that looks a bit cluttered.
|