|
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
|
|
d17e67e6
|
2021-08-29T12:19:49
|
|
tests: change comments to c89 style
|
|
34e685c0
|
2021-08-27T08:28:01
|
|
Merge pull request #5747 from lhchavez/atomic-tests
Homogenize semantics for atomic-related functions
|
|
e66545e3
|
2021-08-27T04:06:54
|
|
Merge remote-tracking branch 'origin/main' into multi-pack-index-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.
|
|
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.
|
|
6bb35878
|
2021-02-08T00:49:21
|
|
clone: set refs/remotes/origin/HEAD to default branch when branch is specified, attempt 2
|
|
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.
|
|
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
|
|
e265eb2f
|
2021-08-24T13:58:24
|
|
tests: show errors when libgit2_init fails
|
|
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
|
|
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!
|
|
9eb17d46
|
2021-02-16T19:38:34
|
|
Introduce GIT_WARN_UNUSED_RESULT
This change adds the GIT_WARN_UNUSED_RESULT annotation, which makes the
compiler warn when a return result is not used. This avoids bugs.
|
|
d095502e
|
2021-08-08T13:34:06
|
|
tests: don't generate false positives on empty path segments
|
|
a5696702
|
2021-07-08T11:58:28
|
|
skip descendant check if remote ref not found
|
|
e5975f36
|
2021-07-30T11:37:12
|
|
tests: reset odb backend priority
|
|
e87bcb3d
|
2021-07-30T10:32:02
|
|
Merge branch 'pr/5491'
|
|
cd460522
|
2020-04-20T22:16:52
|
|
odb: Implement option for overriding of default odb backend priority
Introduce GIT_OPT_SET_ODB_LOOSE_PRIORITY and GIT_OPT_SET_ODB_PACKED_PRIORITY
to allow overriding the default priority values for the default ODB
backends. Libgit2 has historically assumed that most objects for long-
running operations will be packed, therefore GIT_LOOSE_PRIORITY is
set to 1 by default, and GIT_PACKED_PRIORITY to 2.
When a client allows libgit2 to set the default backends, they can
specify an override for the two priority values in order to change
the order in which each ODB backend is accessed.
|
|
d15b6132
|
2021-07-30T07:18:57
|
|
Fix one memory leak in master
There was one test that wasn't correctly disposing of the repository.
|
|
cc68c19a
|
2021-07-30T08:56:51
|
|
Merge branch 'pr/5861'
|
|
f2915ec4
|
2021-07-30T08:56:34
|
|
tests: reformat upstream merge
|
|
003a1df6
|
2021-07-29T08:48:17
|
|
Merge pull request #5952 from libgit2/ethomson/attrs_from_commit
Support reading attributes from a specific commit
|
|
8d453f16
|
2021-07-27T13:00:31
|
|
Swap the order of the `git_graph_reachable_from_any` params
len, array -> array, len
|
|
ce5400cd
|
2021-01-06T06:26:09
|
|
graph: Create `git_graph_reachable_from_any()`
This change introduces a new API function
`git_graph_reachable_from_any()`, that answers the question whether a
commit is reachable from any of the provided commits through following
parent edges.
This function can take advantage of optimizations provided by the
existence of a `commit-graph` file, since it makes it faster to know
whether, given two commits X and Y, X cannot possibly be an reachable
from Y.
Part of: #5757
|
|
fff209c4
|
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
|
|
2370e491
|
2021-07-26T16:27:54
|
|
Merge pull request #5765 from lhchavez/cgraph-revwalks
commit-graph: Use the commit-graph in revwalks
|
|
43b5075d
|
2021-07-22T17:07:56
|
|
Merge pull request #5890 from lolgear/git_submodule_dup
[Submodule] Git submodule dup
|
|
1439b9ff
|
2021-07-22T15:29:54
|
|
filter: introduce GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMIT
Provide a mechanism to filter using attribute data from a specific
commit (making use of `GIT_ATTR_CHECK_INCLUDE_COMMIT`).
|
|
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.
|
|
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.
|
|
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.
|
|
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'
```
|
|
8ad5998f
|
2021-06-30T12:59:37
|
|
Fix memory sanitizer failures in tests
|
|
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.
|
|
55f2abb8
|
2021-06-18T15:47:15
|
|
tests: upstream merge test has been added.
|
|
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
|
|
54a52452
|
2021-06-15T17:33:29
|
|
tests: submodule git lookup can be dupped test comments have been changed.
|
|
b34aaf6c
|
2021-06-14T14:39:20
|
|
test that specific lines can negate broader ignore lines
|
|
1713ab45
|
2021-05-02T13:41:59
|
|
Respect the force flag on refspecs in git_remote_fetch
|
|
11452ca1
|
2021-06-03T11:14:58
|
|
tests: submodule git lookup can be dupped test has been added.
|
|
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
|
|
25b75cd9
|
2021-03-10T07:06:15
|
|
commit-graph: Create `git_commit_graph` as an abstraction for the file
This change does a medium-size refactor of the git_commit_graph_file and
the interaction with the ODB. Now instead of the ODB owning a direct
reference to the git_commit_graph_file, there will be an intermediate
git_commit_graph. The main advantage of that is that now end users can
explicitly set a git_commit_graph that is eagerly checked for errors,
while still being able to lazily use the commit-graph in a regular ODB,
if the file is present.
|
|
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
|