Commit Graph

15691 Commits

Author SHA1 Message Date
Edward Thomson
79290ba49c odb_mempack: use a typed hashmap 2024-10-02 13:07:57 +01:00
Edward Thomson
c7294317ca merge: use type safe oid-keyed hashmaps 2024-10-02 13:07:57 +01:00
Edward Thomson
9a7d920f73 grafts: use a typed oid hashmap 2024-10-02 13:07:57 +01:00
Edward Thomson
90f1785800 describe: use a typed oid hashmap 2024-10-02 13:07:57 +01:00
Edward Thomson
f9ad579ebc commit_graph: use a well-typed oid hashmap 2024-10-02 13:07:57 +01:00
Edward Thomson
7fb641b93a cache: use a well-typed hashmap for oid mapped cache 2024-10-02 13:07:57 +01:00
Edward Thomson
b4be7d0dcd oid: introduce oid hash functions
Provide functions for `git_oid` to provide a 32 bit or 64 bit hash
value, useful for a hashmap.
2024-10-02 13:07:57 +01:00
Edward Thomson
c1ecf566fd hashmap: update index to use new hashmap 2024-10-02 13:07:57 +01:00
Edward Thomson
74c42335f7 tree: use hashmap 2024-10-02 13:07:57 +01:00
Edward Thomson
58c15588e1 transaction: use hashmap 2024-10-02 13:07:57 +01:00
Edward Thomson
e39a4f79dd mwindow: use hashmaps 2024-10-02 13:07:57 +01:00
Edward Thomson
c9c5eba32d submodule: use a hashmap for submodule map 2024-10-02 13:07:57 +01:00
Edward Thomson
be8e75a0e1 diff_driver: use a hashmap_str instead of a strmap 2024-10-02 13:07:57 +01:00
Edward Thomson
8dc52d05ad sortedcache: use a hashset_str instead of a strmap 2024-10-02 13:07:57 +01:00
Edward Thomson
1f0c38fbad config_list: use a hashset_str instead of a strmap 2024-10-02 13:07:57 +01:00
Edward Thomson
ee29ac7f03 checkout: use a hashset_str instead of a strmap 2024-10-02 13:07:57 +01:00
Edward Thomson
29f141d84b attr_cache: move from strmap to hashset_str 2024-10-02 13:07:57 +01:00
Edward Thomson
7890eb1707 attr: use a hashset instead of a strmap 2024-10-02 13:07:57 +01:00
Edward Thomson
0e110d2e9c apply: use new hashset for strings 2024-10-02 13:07:57 +01:00
Edward Thomson
539059f6e3 hashmap: introduce git_hashmap / git_hashset
Introduce `git_hashmap` and `git_hashset` functionality that is a port
of `khash.h` to be more idiomatically libgit2. This gives us many of the
benefits of khash that we had abstracted away:

1. Typesafety on the values, since we define the structs and functions
2. Ability to create hashes on the stack
3. Ability to new up hashmaps (or sets) without the libgit2 abstraction
   wrappers that we had been adding

This uses the macros to define hashes (either the structure, or the
functions, or both) which is very much in the spirit of khash, but
the results are much more idiomatically libgit2.
2024-10-02 13:07:57 +01:00
Edward Thomson
53bc5a128e pool: introduce is_initialized helper method
Let callers understand whether a pool has been initialized or not.
2024-10-02 13:07:57 +01:00
Edward Thomson
419948ef23 attrcache: make the attribute cache opaque
This minor refactoring helps remove some of the coupling that pieces
have to the attribute cache.
2024-10-02 13:07:57 +01:00
Edward Thomson
3b500a92ad ci: update to windows-2022 for sha256 builds 2024-10-02 13:07:57 +01:00
Edward Thomson
5d48749cc7 Merge pull request #6898 from libgit2/ethomson/push
push: handle tags to blobs
2024-10-01 23:03:19 +01:00
Edward Thomson
1e4576dfd7 push: handle tags to blobs 2024-10-01 22:37:24 +01:00
Francis McKenzie
2a494d3669 Added test network::remote::tag 2024-10-01 22:17:01 +01:00
Edward Thomson
1de5a32dda Merge pull request #6896 from libgit2/ethomson/vector
vector: free is now dispose
2024-10-01 21:01:26 +01:00
Edward Thomson
2ba17303d0 Merge pull request #6882 from HamedMasafi/main
Add LIBGIT2_VER_CHECK Macro for Version Comparison
2024-09-30 23:26:41 +01:00
Edward Thomson
50d492063a Rename version constants to LIBGIT2_VERSION
For consistency, use LIBGIT2_VERSION_... as the constant name; deprecate
LIBGIT2_VER_... names.
2024-09-30 23:02:00 +01:00
Edward Thomson
e0b8b4b960 Add LIBGIT2_VERSION_CHECK and LIBGIT2_VERSION_NUMBER 2024-09-30 22:13:44 +01:00
Edward Thomson
e78eec28c3 vector: free is now dispose
In keeping with the libgit2 pattern, we _dispose_ a structure that is
not heap allocated, and _free_ a structure's contents _and the structure
itself_.
2024-09-30 21:28:36 +01:00
Edward Thomson
5efafa9d25 Merge pull request #6895 from libgit2/ethomson/ci
CI updates
2024-09-29 23:52:31 +01:00
Edward Thomson
54e7701ebd libssh2: compatibility fixups 2024-09-29 23:32:48 +01:00
Edward Thomson
12eecf0abc ci: update to (mostly) latest images
Update to the latest CI images, except macOS - where there's a memory
leak in macos-14.
2024-09-29 23:32:19 +01:00
Edward Thomson
d50b501e7e ci: update to download-artifact v4 2024-09-29 23:30:57 +01:00
Edward Thomson
9ddd72f22a Merge pull request #6875 from roberth/mempack-thin-packfile 2024-09-27 17:20:00 +02:00
Robert Hensing
f9c35fb509 Add git_mempack_write_thin_pack
Unlike existing functions, this produces a _thin_ packfile by
making use of the fact that only new objects appear in the
mempack Object Database.

A thin packfile only contains certain objects, but not its whole
closure of references. This makes it suitable for efficiently
writing sets of new objects to a local repository, by avoiding
many small I/O operations.

This relies on write_pack (e.g. git_packbuilder_write_buf) to
implement the "recency order" optimization step.

Basic measurements comparing against the writing of individual
objects show a speedup during when writing large amounts of
content on machines with comparatively slow I/O operations,
and little to no change on machines with fast I/O operations.
2024-09-27 12:39:05 +02:00
Edward Thomson
d82310318d Merge pull request #6881 from rindeal/rindeal-patch-1
transport: do not filter tags based on ref dir in local
2024-09-27 12:34:28 +02:00
Edward Thomson
60f6ff57ba ci: avoid compiler warnings for unused in pcre 2024-09-27 12:24:09 +02:00
Edward Thomson
ffdacef6ff ci: update codeql nighly build 2024-09-27 12:22:49 +02:00
Edward Thomson
0dc5e4afec Merge pull request #6876 from yerseg/report_push_status_in_case_of_fail
push: report a push status even the push has failed
2024-09-27 12:10:50 +02:00
Edward Thomson
910f754aa3 Merge pull request #6893 from libgit2/ethomson/ios
stransport: initialize for iOS
2024-09-27 12:08:20 +02:00
Edward Thomson
9919b3a52b stransport: initialize for iOS
The unused variables in the stransport code should be initialized to
avoid compiler warnings. :eyeroll:
2024-09-27 11:12:22 +02:00
Edward Thomson
38eee393b9 Merge pull request #6886 from libgit2/ethomson/preciousobjects
repo: support the preciousObjects extension
2024-09-26 21:30:06 +02:00
Edward Thomson
d19558ac9b Merge pull request #6862 from Kyle-Ye/optimize/ios
Add SecCopyErrorMessageString for iOS and update README for iOS
2024-09-26 21:29:35 +02:00
Edward Thomson
784c667f0e Merge pull request #6891 from libgit2/ethomson/stransport
Update stransport.c
2024-09-26 21:27:19 +02:00
Edward Thomson
f27bbe0328 Update stransport.c
stransport: correct unused on ios
2024-09-26 17:40:44 +02:00
Edward Thomson
41f6f72910 iOS Updates
Some minor refactoring for iOS:

- Roll back clar changes; these should be a bit more measured, and occur
  in clar upstream.
- Move iOS to nightly builds
2024-09-26 16:59:53 +02:00
Edward Thomson
851628facf Merge remote-tracking branch 'origin/main' into securetransport 2024-09-26 16:48:35 +02:00
Edward Thomson
17c4100592 Merge branch 'securetransport' 2024-09-26 16:45:44 +02:00