|
3779a047
|
2021-05-27T18:47:22
|
|
attr: introduce `git_attr_options` for extended queries
Allow more advanced attribute queries using a `git_attr_options`, and
extended functions to use it. Presently there is no additional
configuration in a `git_attr_options` beyond the flags, but this is for
future growth.
|
|
5ee50488
|
2021-05-22T18:47:03
|
|
attr: rename internal attr file source enum
The enum `git_attr_file_source` is better suffixed with a `_t` since
it's a type-of source. Similarly, its members should have a matching
name.
|
|
96dc1ffd
|
2021-05-22T20:14:47
|
|
attr: the attr source is now a struct
We may want to extend the attribute source; use a structure instead of
an enum.
|
|
6a7f0403
|
2021-07-16T08:47:37
|
|
Merge pull request #5941 from NattyNarwhal/stdintification
stdintification: use int64_t and INT64_C instead of long long
|
|
d6bea53d
|
2021-07-16T08:47:28
|
|
Update tests/graph/commit_graph.c
|
|
f15a6792
|
2021-07-14T09:33:09
|
|
Merge pull request #5913 from lhchavez/python3
Make `FIND_PACKAGE(PythonInterp)` prefer `python3`
|
|
84ce9746
|
2021-07-14T08:39:24
|
|
Merge pull request #5824 from palmin/fix-ignore-negate
fix check for ignoring of negate rules
|
|
97cd165e
|
2021-07-14T08:30:00
|
|
Merge pull request #5926 from Batchyx/batchyx/config-refresh-twice
config: fix included configs not refreshed more than once
|
|
b7dce05c
|
2021-06-16T06:38:41
|
|
Make `FIND_PACKAGE(PythonInterp)` prefer `python3`
This change makes it possible to prefer a python (version 3) interpreter
on systems where python2 and python3 coexist (where python2 is found as
`/usr/bin/python`).
|
|
95a2966f
|
2021-07-13T17:32:02
|
|
Merge pull request #5908 from punkymaniac/patch-mem-leak
Fix memory leak in git_smart__connect
|
|
3f28eafe
|
2021-07-07T19:35:42
|
|
stdint constants in test suite
Passes w/ gcc 11 on Fedora x64.
Protip: So you don;t have to suffer,
```
perl -pe 's/(-?(?:0x)?[A-Fa-f0-9]+)([Uu])?[Ll][Ll]/\U$2INT64_C(\E$1)/mg'
```
|
|
4bf136b0
|
2021-06-23T16:53:53
|
|
config: fix included configs not refreshed more than once
If an included config is refreshed twice, the second update is not taken
into account.
This is because the list of included files is cleared after re-reading
the new configuration, instead of being cleared before.
Fix it and add a test case to check for this bug.
|
|
b0fd4cf8
|
2021-06-16T13:38:45
|
|
Consider files executable only if the user can execute them
This is what git.git does, so we should follow suit.
|
|
bea1b024
|
2021-06-16T10:32:46
|
|
Add test for fetch proxy memleak
|
|
b34aaf6c
|
2021-06-14T14:39:20
|
|
test that specific lines can negate broader ignore lines
|
|
1ee3c37f
|
2021-05-19T09:31:30
|
|
Merge branch 'pr/5853'
|
|
6b1f6e00
|
2021-05-18T12:21:15
|
|
diff: test ignore-blank-lines
|
|
1b1e541d
|
2021-05-18T11:52:51
|
|
tests: clean up refs::races zero oid test
|
|
a6fb72a8
|
2021-05-18T11:51:25
|
|
tests: exit with error on win32 leakcheck
|
|
58944388
|
2021-05-16T11:11:56
|
|
Merge branch 'zero_oid_in_old'
Manually merging #5842
|
|
cf323cb9
|
2021-05-16T11:09:44
|
|
refs: test git_reference_create_matching failure for zero oid
|
|
2d24690c
|
2021-04-15T07:48:43
|
|
Add testcase
|
|
ff78aea6
|
2021-05-11T11:09:31
|
|
Merge pull request #5860 from libgit2/ethomson/buf_text
buf: remove unnecessary buf_text namespace
|
|
14f6950b
|
2021-05-10T23:14:17
|
|
buf: bom enum is in the buf namespace
Instead of a `git_bom_t` that a `git_buf` function returns, let's keep
it `git_buf_bom_t`.
|
|
d525e063
|
2021-05-10T23:04:59
|
|
buf: remove internal `git_buf_text` namespace
The `git_buf_text` namespace is unnecessary and strange. Remove it,
just keep the functions prefixed with `git_buf`.
|
|
68b9605a
|
2021-05-06T15:37:31
|
|
filter: deprecate git_filter_list_apply_to_data
Deprecate `git_filter_list_apply_to_data` as it takes user input as a
`git_buf`. Users should use `git_filter_list_apply_to_buffer` instead.
|
|
4bd17208
|
2021-05-06T02:28:14
|
|
Merge pull request #5858 from libgit2/ethomson/memleaks
test: clean up memory leaks
|
|
b31795ef
|
2021-05-06T01:46:19
|
|
test: clean up memory leaks
|
|
33667c14
|
2021-05-05T23:59:05
|
|
win32: add file and get status on a long path
|
|
f8921ab9
|
2021-05-05T23:26:24
|
|
win32: ensure core.longpaths is honored for workdir paths
|
|
69c65b9a
|
2019-12-31T12:38:03
|
|
path: bump most Win32 unicode buffer sizes from MAX_PATH to GIT_PATH_MAX
|
|
5368be30
|
2021-05-05T23:01:57
|
|
clar: support long paths on Windows
|
|
c44f5688
|
2021-05-02T10:27:56
|
|
Merge pull request #5823 from libgit2/ethomson/path_validation
Working directory path validation
|
|
c15ed350
|
2021-04-26T12:23:25
|
|
repo: validate repository paths
Ensure that a repository's path (at initialization or open time) is
valid. On Windows systems, this means that the longest known path
beneath the repository will fit within MAX_PATH: this is a lock file for
a loose object within the repository itself.
Other paths, like a very long loose reference, may fail to be opened
after the repository is opened. These variable length paths will be
checked when they are accessed themselves. This new functionality is
done at open to prevent needlessly checking every file in the gitdir
(eg, `MERGE_HEAD`) for its length when we could instead check once at
repository open time.
|
|
e5851c62
|
2021-04-24T09:44:45
|
|
refs: ensure loose refs adhere to path validation
On Windows, we need to enforce MAX_PATH for loose references and their
reflogs. Ensure that any path - including the lock file - would fit
within the 260 character maximum.
We do not honor core.longpaths for loose reference files or reflogs.
core.longpaths only applies to paths in the working directory.
|
|
9fb755d5
|
2021-04-04T19:59:57
|
|
attr: validate workdir paths for attribute files
We should allow attribute files - inside working directories - to have
names longer than MAX_PATH when core.longpaths is set.
`git_attr_path__init` takes a repository to validate the path with.
|
|
50e01216
|
2021-03-20T16:39:29
|
|
repo: introduce git_repository_workdir_path
Add a simple accessor for workdir paths to get an absolute on-disk path
given a repository and a relative path within it. This is useful to
avoid copy-pasta `git_buf_joinpath` and to ensure that we validate
working directory paths while honoring `core.longpaths` settings.
|
|
dbc03de4
|
2021-03-20T14:28:25
|
|
apply: ensure we validate paths
There was no test ensuring that we validate `.git` paths. We do, but
let's add a test to make sure that we never regress this.
|
|
dc1ba018
|
2021-03-20T13:01:00
|
|
path: introduce ondisk and workdir path validation
Introduce `git_path_validate_filesystem` which validates (absolute) on-disk
paths and `git_path_validate_workdir` to perform validations on (absolute)
working directory paths. These functions are useful as there may be system
limitations on on-disk paths, particularly on Windows (for example,
enforcing MAX_PATH).
For working directory paths, these limitations may be per-repository, based
on the `core.longpaths` configuration setting.
|
|
95b7a639
|
2021-04-14T21:52:36
|
|
git_reference_create_matching: Treat all-zero OID as "must be absent"
This is pretty useful in avoiding races: I want to create a ref only if
it doesn't already exist. I can't check first because of TOCTOU -- by
the time I finish the check, someone else might have already created
the ref. And I can't take a lock because then I can't do the create,
since the create expects to take the lock.
The semantics are inspired by git update-ref, which allows an all-zero old
value to mean that the ref must not exist.
|
|
88323cd0
|
2021-03-20T09:52:17
|
|
path: git_path_isvalid -> git_path_validate
If we want to validate more and different types of paths, the name
`git_path_validate` makes that easier and more expressive. We can add,
for example, `git_path_validate_foo` while the current name makes that
less ergonomic.
|
|
cb136cdd
|
2021-04-14T22:22:11
|
|
utf8: introduce git_utf8_char_length
Introduce a function to determine the number of Unicode characters in a
given UTF-8 string.
|
|
52447c5c
|
2021-04-11T23:16:37
|
|
tests: fix variable name in list.c
|
|
7891e153
|
2021-04-01T11:34:38
|
|
Default to GIT_BRANCH_DEFAULT if init.defaultBranch is empty string
We already do this in repo_init_head
|
|
a0fca809
|
2021-03-10T11:19:14
|
|
Merge pull request #5814 from ianhattendorf/fix/winhttp-proxy-https
winhttp: skip certificate check if unable to send request
|
|
d7e65096
|
2021-03-04T09:44:26
|
|
Merge pull request #5764 from lhchavez/cgraph-needs-refresh
commit-graph: Introduce `git_commit_graph_needs_refresh()`
|
|
b99b5a81
|
2021-03-04T09:38:10
|
|
Merge pull request #5763 from lhchavez/cgraph-lookup
commit-graph: Support lookups of entries in a commit-graph
|
|
592a3252
|
2021-03-01T11:00:37
|
|
winhttp: test proxy https clone
|
|
2ad15250
|
2021-02-01T09:58:25
|
|
Merge pull request #5762 from lhchavez/cgraph-parser
commit-graph: Introduce a parser for commit-graph files
|
|
4732e030
|
2021-01-31T00:36:54
|
|
revspec: rename git_revparse_mode_t to git_revspec_t
The information about the type of a revision spec is not information
about the parser. Name it accordingly, so that `git_revparse_mode_t`
is now `git_revspec_t`. Deprecate the old name.
|
|
674875dc
|
2021-01-15T09:59:15
|
|
Merge pull request #5768 from lhchavez/midx-needs-refresh
midx: Fix a bug in `git_midx_needs_refresh()`
|
|
487f2a82
|
2021-01-10T21:32:28
|
|
Merge pull request #5775 from libgit2/ethomson/clone_branch
clone: set refs/remotes/origin/HEAD when branch is specified
|
|
1a2f9609
|
2021-01-05T06:24:26
|
|
commit-graph: Introduce `git_commit_graph_needs_refresh()`
This change introduces a function that allows the caller to know whether
the `commit-graph` file has not been modified since it was parsed.
Part of: #5757
|
|
1f32ed25
|
2021-01-04T19:33:48
|
|
commit-graph: Support lookups of entries in a commit-graph
This change introduces `git_commit_graph_entry_find()` and
`git_commit_graph_entry_parent()`. These two functions allow a much
faster lookup of commits by ID, since the ODB does not need to be
consulted, the commit object does not need to be inflated, and the
contents of the commit object do not need to be parsed.
Part of: #5757
|
|
3fd57a75
|
2021-01-04T18:22:43
|
|
commit-graph: Introduce a parser for commit-graph files
This change is the first in a series to add support for git's
commit-graph. This should speed up commit graph traversals by avoiding
object parsing and allowing some operations to terminate earlier.
Part of: #5757
|
|
923c0f7b
|
2021-01-07T17:34:17
|
|
clone: set refs/remotes/origin/HEAD when branch is specified
When a branch is specified to check out in clone, update the remote
tracking `HEAD` to point to it. This mimics git's behavior, when
`git clone -b <name>` is used.
|
|
d50d3db6
|
2021-01-07T05:43:30
|
|
midx: Fix a bug in `git_midx_needs_refresh()`
The very last check in the freshness check for the midx was wrong ><
This was also because this function was not tested.
|
|
3f4bc213
|
2021-01-07T14:05:02
|
|
repo: ignore empty init.defaultbranch
The init.defaultbranch option may be set, but empty. In this case, we
should ignore it instead of trying to set our default branch to
`refs/heads/`.
|
|
c41871e5
|
2021-01-07T12:22:08
|
|
fetch: test when HEAD points to nonexistent branch
When HEAD points to a nonexistent or invalid branch - for example, to
`refs/heads/` - the fetch should be permitted to continue, but we should
not use it when creating the `for merge` option in the FETCH_HEAD file.
(This emulates git's behavior.)
|
|
c31032a3
|
2021-01-07T10:15:25
|
|
Merge pull request #5760 from libgit2/ethomson/tttoo_many_ttts
blob: fix name of `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD`
|
|
855f2998
|
2021-01-05T14:45:14
|
|
blob: fix name of `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD`
`GIT_BLOB_FILTER_ATTTRIBUTES_FROM_HEAD` is misspelled, it should be
`GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD`, and it would be if it were not
for the MacBook Pro keyboard and my inattentiveness.
|
|
d9c15387
|
2021-01-05T14:29:58
|
|
blob: add git_blob_filter_options_init
The `git_blob_filter_options_init` function should be included, to allow
callers in FFI environments to let us initialize an options structure
for them.
|
|
780ad7a9
|
2020-12-17T14:09:45
|
|
urlparse: use consistent ipv6 address rules
IPv6 addresses should be used identically internally; we should not
denote them with brackets in one operating system and without them in
another.
|
|
ab3e8565
|
2019-07-01T19:59:01
|
|
urlparse: Add IPv4 and IPv6 based tests
|
|
212ae9a7
|
2020-12-21T06:48:48
|
|
Fix the `-DENABLE_WERROR=ON` build for gcc 10.2
This change makes it possible to build with newer versions of gcc
without warnings. There were two warnings issued:
* gcc 8 added
[`-Wstringop-truncation`](https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/),
which warns if a call to `strncpy(3)` is prone to accidentally
truncating the destination string, since `strncpy(3)` does NOT add a
terminating `NULL` if the destination buffer is not large enough to
hold the input.
This change uses the pattern suggested in
https://us-cert.cisa.gov/bsi/articles/knowledge/coding-practices/strncpy-and-strncat
to fix the locations flagged by gcc.
* There was a potentially uninitialized access of `dest` in `fs_copy`.
|
|
5ab0736b
|
2020-12-19T09:30:26
|
|
Add tests for `git__multiply_int64_overflow`
As it turns out, the implementation of `git__multiply_int64_overflow` is
full of edge cases and tricky arithmetic. That means that it should have
unit tests.
As a result, a bug in `git__strntol64` was found (and fixed!) in
clang+32-bit.
|
|
589b8129
|
2020-12-14T10:43:07
|
|
badssl: RC4 should not fail with ECERTIFICATE
Using RC4 is not a _certificate_ problem, it's a cipher problem. The
SSL implementation should and will fail with an unrecoverable error
(-1). There's no opportunity to accept/continue.
|
|
89ffa98e
|
2017-11-18T15:51:08
|
|
badssl: re-enable RC4 test
This used to fail with an error indicating a mis-use of OpenSSL on platforms
using it due to poor error handling. Re-enable it even if this isn't the right
error code to use for now.
|
|
fd2d4759
|
2020-12-05T22:22:38
|
|
threads: git_tls_data to git_tlsdata
Use a no-allocation approach to the TLS data abstraction.
|
|
404dd024
|
2020-12-05T15:57:48
|
|
threads: rename thread files to thread.[ch]
|
|
37763d38
|
2020-12-05T15:26:59
|
|
threads: rename git_atomic to git_atomic32
Clarify the `git_atomic` type and functions now that we have a 64 bit
version as well (`git_atomic64`).
|
|
0450e313
|
2020-12-05T22:03:59
|
|
tests: ifdef out unused function in no-thread builds
|
|
322c15ee
|
2020-08-01T18:24:41
|
|
Make the pack and mwindow implementations data-race-free
This change fixes a packfile heap corruption that can happen when
interacting with multiple packfiles concurrently across multiple
threads. This is exacerbated by setting a lower mwindow open file limit.
This change:
* Renames most of the internal methods in pack.c to clearly indicate
that they expect to be called with a certain lock held, making
reasoning about the state of locks a bit easier.
* Splits the `git_pack_file` lock in two: the one in `git_pack_file`
only protects the `index_map`. The protection to `git_mwindow_file` is
now in that struct.
* Explicitly checks for freshness of the `git_pack_file` in
`git_packfile_unpack_header`: this allows the mwindow implementation
to close files whenever there is enough cache pressure, and
`git_packfile_unpack_header` will reopen the packfile if needed.
* After a call to `p_munmap()`, the `data` and `len` fields are poisoned
with `NULL` to make use-after-frees more evident and crash rather than
being open to the possibility of heap corruption.
* Adds a test case to prevent this from regressing in the future.
Fixes: #5591
|
|
f847fa7b
|
2020-02-16T02:00:56
|
|
midx: Support multi-pack-index files in odb_pack.c
This change adds support for reading multi-pack-index files from the
packfile odb backend. This also makes git_pack_file objects open their
backing failes lazily in more scenarios, since the multi-pack-index can
avoid having to open them in some cases (yay!).
This change also refreshes the documentation found in src/odb_pack.c to
match the updated code.
Part of: #5399
|
|
2cfa31c4
|
2020-04-05T18:30:07
|
|
path: remove unused git_path_topdir
|
|
d9d86e41
|
2020-11-21T22:13:51
|
|
Merge pull request #5580 from libgit2/ethomson/win32_leakcheck
msvc crtdbg -> win32 leakcheck
|
|
045748bb
|
2020-11-21T22:06:57
|
|
Merge pull request #5692 from rbmclean/master
Add missing worktree_dir check and test case
|
|
c8fe4da3
|
2020-11-21T22:06:03
|
|
Apply suggestions from code review
|
|
8aed4629
|
2020-07-12T18:43:22
|
|
cmake: rename MSVC_CRTDBG to WIN32_LEAKCHECK
|
|
cb4b3bdf
|
2020-07-12T17:49:42
|
|
win32: "crtdbg" is now "leakcheck"
msvc crtdbg is a mouthfull that is not particularly indicative of what
it does. Let's rename it to "win32 leakcheck".
|
|
303b4c68
|
2020-11-07T16:30:44
|
|
worktree: change test to invalidate worktree via filesystem
|
|
848c7793
|
2020-11-06T11:32:13
|
|
worktree: Demonstrate missing worktree check
worktree_dir isn't validated when it should be
|
|
0caa4655
|
2020-09-09T10:48:00
|
|
Add git_tag_name_is_valid
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
fe11160c
|
2020-09-08T21:05:18
|
|
Add git_branch_name_is_valid
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
55a7117d
|
2020-10-11T13:55:44
|
|
remote: use git_remote_name_is_valid
|
|
68e35588
|
2020-10-11T13:35:35
|
|
refspec: return GIT_EINVALIDSPEC for invalid specs
Disambiguate invalid specifications in `git_refspec__parse` so that
callers can determine the difference between invalid specifications and
actual errors. No call sites wil propagagte this new error message to
an end-user, so there is no user-facing API change.
|
|
b52bb4d4
|
2020-10-11T13:20:52
|
|
refs: use git_reference_name_is_valid
|
|
20450cbe
|
2020-10-14T13:44:59
|
|
Merge pull request #5546 from libgit2/ethomson/init
Refactor "global" state
|
|
4a0dceeb
|
2020-10-11T17:53:10
|
|
Make the Windows leak detection more robust
This change:
* Increases MY_ROW_LIMIT to 2M, since it has been failing in #5595's
tests since it's _super_ close to the limit.
* Calls `git_repository_free()` on a `git_repository` that was being
leaked only in Windows.
* Marks the global `git_repository` on `tests/repo/init.c` as `NULL`
after being freed to make any accidental access more noisy.
* Uses `cl_assert_equal_i()` in `test_trace_windows_stacktrace__leaks`
to make the test failures more actionable.
* Renames the globals in `tests/repo/init.c` so that they don't start
with an underscore.
|
|
e316b0d3
|
2020-05-15T11:47:09
|
|
runtime: move init/shutdown into the "runtime"
Provide a mechanism for system components to register for initialization
and shutdown of the libgit2 runtime.
|
|
c40d2dc5
|
2020-05-15T10:09:51
|
|
thread: restore the git_thread_exit tests
We were never properly testing git_thread_exit. Do so.
|
|
6554b40e
|
2020-05-13T10:39:33
|
|
settings: localize global data
Move the settings global data teardown into its own separate function,
instead of intermingled with the global state.
|
|
c837bff1
|
2020-10-05T11:03:39
|
|
clone: test that the origin HEAD is created
Ensure that we created `refs/remotes/origin/HEAD` when cloning, a
symbolic link pointing to `refs/remotes/origin/<default>`
|
|
005e7715
|
2020-02-23T22:28:52
|
|
multipack: Introduce a parser for multi-pack-index files
This change is the first in a series to add support for git's
multi-pack-index. This should speed up large repositories significantly.
Part of: #5399
|
|
9293e165
|
2020-10-04T21:41:28
|
|
Merge pull request #5494 from kevinjswinton/master
Fix binary diff showing /dev/null
|
|
3a72345b
|
2020-10-04T18:25:32
|
|
Merge pull request #5581 from libgit2/ethomson/mainbranch
Respect `init.defaultBranch` setting
|
|
a94fedc1
|
2020-10-04T18:04:01
|
|
Merge pull request #5620 from dlax/parse-patch-add-delete-no-index
patch_parse: handle absence of "index" header for new/deleted cases
|
|
a1f0135d
|
2020-10-04T18:01:09
|
|
Merge pull request #5626 from csware/parse_bool
boolean config parsing fails in some cases with mapped values
|
|
36dc681e
|
2020-10-04T17:54:15
|
|
Merge pull request #5629 from csware/config-multiline-parse
Fix config file parsing with multi line values containing quoted parts
|
|
6ac18625
|
2020-09-09T17:51:38
|
|
Fix config file parsing with multi line values containing quoted parts
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|