|
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.
|
|
aa993f76
|
2021-09-13T11:40:38
|
|
buf: introduce `git_buf_truncate_at`
|
|
646bae34
|
2021-09-14T07:47:19
|
|
Merge pull request #6041 from Esri/duncan/typeof
Use __typeof__ GNUC keyword for ISO C compatibility
|
|
b6735461
|
2021-09-14T07:46:49
|
|
Merge pull request #6039 from lhchavez/avoid-mmap-in-git-indexer-append
indexer: Avoid one `mmap(2)`/`munmap(2)` pair per `git_indexer_append` call
|
|
4f24a932
|
2021-09-14T07:45:50
|
|
Merge pull request #6031 from libgit2/ethomson/extensions
Support custom git extensions
|
|
5bd49aee
|
2021-09-14T07:44:37
|
|
Merge pull request #6045 from punkymaniac/qa-fix-coding-style-pointer
Fix coding style for pointer
|
|
1f6263b8
|
2021-09-14T07:43:35
|
|
Merge pull request #6043 from basile-henry/config-multiline-comment-chars
Fix config parsing for multiline with multiple quoted comment chars
|
|
cd0fd0f5
|
2021-09-10T07:19:06
|
|
notes: use a buffer internally
Code cleanup to use `git_buf`s instead of simple c strings.
|
|
574c590f
|
2021-09-09T21:53:45
|
|
Fix multiline strip_comments logic
The strip_comments function uses the count of quotes to know if a
comment char (';' or '#') is the start of a comment or part of the
multiline as a string.
Unfortunately converting the count of quotes from previous lines to a
boolean meant that it would only work as expected in some cases
(0 quotes or an odd number of quotes).
|
|
379c4646
|
2021-09-09T19:49:04
|
|
Fix coding style for pointer
Make some syntax change to follow coding style.
|
|
6c53d6ab
|
2021-09-08T18:42:42
|
|
Use __typeof__ GNUC keyword for ISO C compatibility
|
|
c65eb24c
|
2021-09-08T08:47:39
|
|
Avoid double negatives in the justification for truncation
Turns out, double negatives are harder to parse than positive
statements.
|
|
6571ba7b
|
2021-09-08T06:29:58
|
|
Only avoid `mmap(2)`/`ftruncate(2)` when in non-Windows
It turns out that if we use `mmap(2)`, non-Windows remote filesystems
break due to permissions. If we don't, _Windows_ remote filesystems
break due to lack of coherence between memory mapped views of the file
and direct I/O operations done to the files.
To break out of this impossible situation, conditionally-compile
versions of Windows-specific `write_at` and `append_to_pack`.
|
|
eeceaac0
|
2021-09-07T08:38:35
|
|
Also remove a `ftruncate(2)` call in `git_indexer_commit`
Now that we're not using `mmap(2)` for writing stuff, we don't need to
truncate the file afterwards, since it'll have the correct size at the
end of the process. Whee~!
|
|
66a75fde
|
2021-09-07T07:14:39
|
|
indexer: Avoid one `mmap(2)`/`munmap(2)` pair per `git_indexer_append` call
This change makes `append_to_pack` completely rely on `p_pwrite` to do
all its I/O instead of splitting it between `p_pwrite` and a
`mmap(2)`/`munmap(2)`+`memcpy(3)`. This saves a good chunk of user CPU
time and avoids making two syscalls per round, but doesn't really cut
down a lot of wall time (~1% on cloning the
[git](https://github.com/git/git.git) repository).
|
|
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.
|
|
27f50a66
|
2021-09-02T18:59:19
|
|
#6028: Check if `threadstate->error_t.message` is not `git_buf__initbuf` before freeing.
This follows the same principle as `buffer.c` where the same check is done before freeing the buffer. It fixes the crash described in #6028.
|
|
4fd32be0
|
2021-09-01T23:06:19
|
|
url: ensure minimum components for formatting
|
|
fd50810a
|
2021-09-01T22:49:14
|
|
url: ensure minimum components for formatting
|
|
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.
|
|
f89dc917
|
2021-09-01T20:30:59
|
|
url: introduce `git_net_url_dup`
|
|
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.
|
|
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>
|
|
1e49f127
|
2021-08-31T05:23:20
|
|
Fix a possible null pointer dereference
This change fixes a possible null pointer dereference if anything inside
`git_commit_graph_writer_add_index_file` fails before the packfile being
valid.
https://scan6.coverity.com/reports.htm#v52218/p10377/fileInstanceId=122935896&defectInstanceId=32525576&mergedDefectId=1461634
|
|
3addb796
|
2021-08-30T23:10:24
|
|
Merge pull request #5943 from kcsaul/fix/5851
Fix worktree iteration when repository has no common directory
|
|
4e8840fd
|
2021-08-30T18:20:35
|
|
Merge pull request #6022 from lollipopman/connect-proxy-host-header
Set Host Header to match CONNECT authority target
|
|
98be5a11
|
2021-08-30T17:55:47
|
|
Merge branch 'cgraph-write' into main
|
|
34fa6311
|
2021-08-30T17:55:13
|
|
commit graph: formatting fixes
|
|
fc5d0e80
|
2021-08-30T21:24:54
|
|
Set Host Header to match CONNECT authority target
Prior to this change, for CONNECT requests, the Host header was set to
the host and port of the target http proxy. However, per the rfc7230 for
HTTP/1.1 this is incorrect as the Host header should match the target of
the CONNECT request, as detailed in section 5.3.3 & 5.4.
5.3.3. authority-form
The authority-form of request-target is only used for CONNECT
requests (Section 4.3.6 of [RFC7231]).
authority-form = authority
When making a CONNECT request to establish a tunnel through one or
more proxies, a client MUST send only the target URI's authority
component (excluding any userinfo and its "@" delimiter) as the
request-target. For example,
CONNECT www.example.com:80 HTTP/1.1
5.4. Host
<snip>
A client MUST send a Host header field in all HTTP/1.1 request
messages. If the target URI includes an authority component, then a
client MUST send a field-value for Host that is identical to that
authority component, excluding any userinfo subcomponent and its "@"
delimiter (Section 2.7.1). If the authority component is missing or
undefined for the target URI, then a client MUST send a Host header
field with an empty field-value.
This issue was noticed when proxying requests through HAProxy 2.2 which
rejects these invalid http requests.
|
|
ed0ea96e
|
2021-08-30T09:02:26
|
|
date: promote before multiply
|
|
f93beebc
|
2021-08-30T08:49:00
|
|
filter: don't overwrite error value
|
|
036be150
|
2021-08-30T08:47:04
|
|
hashsig: close fd on error
|
|
9191ef70
|
2021-08-30T08:40:26
|
|
error: don't check string after assert
|
|
50b3c2d5
|
2021-08-30T08:31:50
|
|
pack: don't assert in the lock
|
|
e7eb6c6b
|
2021-08-30T08:28:56
|
|
midx: return an error when detected
|
|
5eb2b0b3
|
2021-08-30T08:27:27
|
|
httpclient: actually return `GIT_EAUTH`
|
|
969a056c
|
2021-08-29T22:54:01
|
|
Merge pull request #6017 from libgit2/ethomson/buf_is_readonly
buf: deprecate public git_buf writing functions
|
|
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
|
|
cdb9f390
|
2021-08-24T17:37:15
|
|
mbedTLS: Fix setting certificate directory
fixes #6003
|
|
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
|
|
147b659f
|
2021-08-29T21:40:26
|
|
Merge pull request #5405 from lhchavez/multi-pack-index-odb-write
midx: Introduce git_odb_write_multi_pack_index()
|
|
18293385
|
2021-08-29T21:40:16
|
|
Merge pull request #5395 from josharian/http-use-eauth
Use error code GIT_EAUTH for authentication failures
|
|
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
|
|
9937967e
|
2021-08-29T21:29:14
|
|
Merge branch 'main' into http-use-eauth
|
|
d2316d57
|
2021-08-29T13:10:44
|
|
buf: deprecate public git_buf writing functions
A `git_buf` is now a read-only structure as far as callers are
concerned. This is a mechanism that we can return data to callers
using memory that is owned by the library and can be cleaned up by
callers (using `git_buf_dispose`).
A `git_buf` can no longer be allocated by callers or provided to the
library.
|
|
5bcef522
|
2021-08-27T17:06:50
|
|
filter: deprecate apply function
|
|
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.
|
|
f593fa97
|
2021-08-27T16:46:21
|
|
ident: use streaming filters
|
|
c1f4f45e
|
2021-08-27T16:43:00
|
|
crlf: use streaming filters
|
|
a8943c04
|
2021-08-27T15:59:01
|
|
filter: proxy_stream is now git_filter_buffered_stream
The filter's proxy_stream is used to adapt filters that only provided an
`apply` function into a `stream` function. Make this internal to the
library instead of private to the filter file. This will allow the
filters to use it directly, instead of relying on the filter
functionality to do the proxying.
|
|
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.
|
|
45489a11
|
2021-08-27T08:29:27
|
|
Merge pull request #6008 from boretrk/array
git_array_alloc: return objects of correct type
|
|
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
|
|
366115e0
|
2021-08-27T04:06:31
|
|
Review feedback
|
|
94008e6a
|
2021-08-26T05:50:23
|
|
Fixups for the latest changes in the array interface
|
|
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`!
|
|
cb078d51
|
2021-08-05T14:02:54
|
|
Check if default branch matches refspec
|
|
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.
|
|
f062eb62
|
2021-08-25T22:12:57
|
|
git_array_alloc: return objects of correct type
|
|
fabacb7c
|
2021-08-25T15:24:35
|
|
Merge pull request #6007 from boretrk/array
array: check dereference from void * type
|
|
c7a195a1
|
2021-08-25T14:11:03
|
|
Merge pull request #6006 from boretrk/c11-warnings
GCC C11 warnings
|
|
7f1dd703
|
2021-08-25T20:08:58
|
|
array: fix dereference from void * type
|
|
bcc0d750
|
2021-08-25T18:58:39
|
|
array: make gcc keep the type of the NULL return value
|
|
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.
|
|
efc4e7e5
|
2021-08-25T12:30:06
|
|
Merge pull request #5802 from lhchavez/git-warn-unused-result
Introduce GIT_WARN_UNUSED_RESULT
|
|
0850b172
|
2021-08-25T12:20:50
|
|
Merge pull request #5950 from boretrk/posixtest
open: input validation for empty segments in path
|
|
40f3702c
|
2021-08-25T11:36:06
|
|
c90/c99: name the unnamed union in git_hash_ctx
|
|
9fce506c
|
2021-08-24T15:53:10
|
|
openssl: lazily load libraries when dynamically loading
Defer dlopen until it's needed when dynamically loading OpenSSL
libraries.
|
|
aad497cb
|
2021-08-24T14:08:43
|
|
openssl: dynamically load on macOS
|
|
5158b0b7
|
2021-08-24T11:56:22
|
|
ntlmclient: update to ntlmclient 0.9.1
The ntlmclient dependency can now dynamically load OpenSSL.
|
|
0903cac1
|
2021-08-11T01:30:38
|
|
openssl: dynamically load libssl and symbols (optionally)
Provide an interface around OpenSSL to dynamically load the libraries
and symbols, so that users can distribute a libgit2 library that is not
linked directly against OpenSSL. This enables users to target multiple
distributions with a single binary.
This mechanism is optional and disabled by default. Configure cmake
with -DUSE_HTTPS=OpenSSL-Dynamic to use it.
|
|
150eddd9
|
2021-08-10T21:41:05
|
|
openssl: separate legacy api
Refactor the OpenSSL stream implementation so that the legacy code is better
abstracted. This will enable future development.
|
|
1903cfef
|
2021-08-19T16:49:41
|
|
openssl: don't fail when we can't customize allocators
During valgrind runs, we try to swap out the OpenSSL allocators for our
own. This allows us to avoid some unnecessary warnings about usage.
Unfortunately, many builds of OpenSSL do not allow you to swap
allocators; for example FIPS builds and the builds running in CentOS.
Try to swap the allocators, but do not fail when they cannot be
customized.
|
|
727d903a
|
2021-08-18T21:01:36
|
|
sha1dc: remove conditional for <sys/types.h>
|
|
2dbe413e
|
2021-08-17T11:34:11
|
|
Fix LIBGIT2_FILENAME not being passed to the resource compiler
|
|
c1c59843
|
2021-08-14T11:15:51
|
|
Merge pull request #5972 from libgit2/ethomson/http_empty_password
http: don't require a password
|
|
5fd44239
|
2021-08-10T10:06:43
|
|
Merge pull request #5854 from alexjg/respect-force-flag-in-remote-fetch
Respect the force flag on refspecs in git_remote_fetch
|
|
991ccdc5
|
2021-08-01T06:19:15
|
|
formatting
|
|
b060080e
|
2021-07-30T06:53:49
|
|
Get Win32 builds to build
Previously, the location of `GIT_WARN_UNUSED_RESULT` was causing it to
be included _after_ a bunch of other headers (namely `src/vector.h`),
which broke the build.
This change does two things:
* Moves the `GIT_WARN_UNUSED_RESULT` above most of the `$include`s in
`src/common.h`.
* Stops including `vector.h` from `src/win32/path_w32.c` since the
header itself does not use it.
|
|
4e8376a9
|
2021-07-30T06:34:15
|
|
Move GIT_WARN_UNUSED_RESULT from the public to the private API
|
|
c4cbab32
|
2021-07-30T06:33:56
|
|
Handle one more unused variable introduced since the PR started
|
|
4bb1568f
|
2021-03-04T06:14:36
|
|
Be a little bit less aggressive GIT_WARN_UNUSED_RESULT
Now we're limiting ourselves to only functions that allocate or acquire
locks.
|
|
231ca4fa
|
2021-02-23T19:33:34
|
|
Proof-of-concept for a more aggressive GIT_UNUSED()
This adds a `-Wunused-result`-proof `GIT_UNUSED()`, just to demonstrate
that it works. With this, sortedcache.h is now completely
`GIT_WARN_UNUSED_RESULT`-annotated!
|