Commit Graph

15277 Commits

Author SHA1 Message Date
Edward Thomson
467556993f ntlmclient: use unsigned char for ctype functions 2024-03-18 11:07:47 +00:00
Edward Thomson
8e6beb3d16 ctype: switch to git__ ctype functions
Use the `git__` ctype functions (`git__isdigit` and friends) instead of
explicitly casting.
2024-03-18 11:07:47 +00:00
Edward Thomson
647f8eb987 ctype: only use custom functions on Windows
The Microsoft C runtime (MSVCRT) may take a heavy lock on the
locale in order to figure out how the `ctype` functions work.
This is deeply slow. Provide our own to avoid that.

On POSIX, provide emulation for that functionality using the ctype
functions, but compress the return value into a `bool`, and cast the
value to an `unsigned char`.
2024-03-18 11:07:47 +00:00
Peter Pettersson
e619b884d5 ctype: cast characters to unsigned when classifying characters
ctype classification takes an integer in as returned from getc()
if we just sign extend characters to integers 128-255 will be
misclassified. (255 will become EOF)
Newlib in particular doesn't like this since they uses the value
as an index in a lookup table.
2023-12-16 23:48:18 +01:00
Edward Thomson
fde12a1fad Merge pull request #6681 from libgit2/ethomson/index_pack
cli: add `index-pack` command
2023-12-16 15:17:16 +00:00
Edward Thomson
460b3360d7 Merge pull request #6688 from libgit2/ethomson/actions
ci: allow workflows to push changes
2023-12-16 14:50:19 +00:00
Edward Thomson
0b10c3fb43 ci: allow workflows to push changes
Our workflows push documentation changes; ensure that they are allowed
to do so.
2023-12-16 14:39:29 +00:00
Edward Thomson
e34130a5a2 Merge pull request #6683 from kcsaul/ignore_missing_index
Fix 'path cannot exist in repository' during diff for in-memory repository
2023-12-16 14:36:53 +00:00
Edward Thomson
a52ad15d84 Merge pull request #6687 from libgit2/ethomson/actions
ci: allow workflows to read and write packages
2023-12-16 14:30:19 +00:00
Edward Thomson
e22ab15ecf Merge pull request #6572 from thosey/blame_buffer_fix
Git blame buffer gives the wrong result in many cases where there are…
2023-12-16 14:08:35 +00:00
Edward Thomson
955b297149 Merge pull request #6682 from libgit2/ethomson/find_iconv
cmake: rename FindIconv to avoid collision with cmake
2023-12-16 14:04:53 +00:00
Edward Thomson
8f3e2d26d3 ci: allow workflows to read and write packages
Our CI workflows consume and will automatically generate their build
containers. Ensure that they can do so.
2023-12-16 14:03:46 +00:00
Kevin Saul
f5793057fa attr: ignore missing index 2023-12-15 12:07:49 +13:00
Edward Thomson
9d767b9d5e cmake: rename FindIconv to avoid collision with cmake
cmake now includes `FindIconv`. Rename ours to avoid any confusion.
2023-12-14 22:26:05 +00:00
Edward Thomson
cba3469cdb cli: add index-pack command 2023-12-14 22:18:23 +00:00
Edward Thomson
b4e84a760c Merge pull request #6680 from libgit2/ethomson/actions
actions: set permissions
2023-12-14 21:55:33 +00:00
Edward Thomson
87b1bf80f3 Merge branch 'pr/6339' into actions 2023-12-14 21:29:45 +00:00
Edward Thomson
d1bdf2a8b9 Merge pull request #6678 from libgit2/ethomson/compat_fixes
Several compatibility fixes
2023-12-14 20:57:22 +00:00
Edward Thomson
82d441456c Merge branch 'pr/6657' into main 2023-12-14 20:53:27 +00:00
Edward Thomson
85c4edfae3 signature: test new leading/trailing dot parsing
We now allow leading and trailing dots in username and email addresses.
Test that we do so.
2023-12-14 20:50:51 +00:00
Edward Thomson
2d744e9c4d Merge pull request #6361 from boretrk/localclone3
clone: don't mix up "http://url" with "http:/url" when figuring out if we should do a local clone
2023-12-14 20:23:52 +00:00
Peter Pettersson
26b08d4c6d clone: don't test remote url against filesystem 2023-12-14 20:27:15 +01:00
Peter Pettersson
d728cb610b ci: add url-like path to online clone tests 2023-12-14 20:27:15 +01:00
Edward Thomson
03a582b11d Merge pull request #6677 from libgit2/ethomson/netbsd
process: test /usr/bin/false on BSDs
2023-12-14 14:31:26 +00:00
Edward Thomson
839b249525 tests: update to latest clar 2023-12-14 14:26:09 +00:00
Edward Thomson
e020c85eb8 Merge pull request #6671 from kcsaul/repo_new_oid_type
Support setting oid type for in-memory repositories
2023-12-14 14:22:06 +00:00
Edward Thomson
6fb234b5fb process: use unsigned int for bitfields 2023-12-14 14:17:24 +00:00
Edward Thomson
2098c490c8 net: use an unsigned int for a bitfield 2023-12-14 14:07:03 +00:00
Edward Thomson
60c68e7e03 cli: use the latest version of adopt 2023-12-14 14:06:51 +00:00
Edward Thomson
18aa18bee1 smart: use an unsigned int for a bitfield 2023-12-14 13:42:12 +00:00
Edward Thomson
9ed52434b7 refdb: use an unsigned int for a bitfield 2023-12-14 13:42:12 +00:00
Edward Thomson
de9a76b92c config: properly handle multiline quotes
Pass a pointer to the quote counts so that we can increment it.
2023-12-14 13:42:12 +00:00
Edward Thomson
b882e9e7a6 stream: use an unsigned int for a bitmask 2023-12-14 13:42:12 +00:00
Edward Thomson
4681b3aee4 ntlmclient: update to latest version
Ensure that we declare variables at the top of the block for broad
compatibility with old compilers.
2023-12-14 13:42:12 +00:00
Edward Thomson
2dbc810a54 Merge pull request #6675 from libgit2/ethomson/push_cancel
push: set generic error in push_negotiation cb
2023-12-14 12:21:05 +00:00
Edward Thomson
ac23866768 Merge pull request #6676 from libgit2/ethomson/release
release: add a compatibility label
2023-12-14 12:20:27 +00:00
Edward Thomson
31fd5e3657 release: add a compatibility label
Add a compatibility label to the release.yml to describe things that are for improved cross-platform compatibility.
2023-12-14 12:16:12 +00:00
Edward Thomson
8b7495fc82 push: set generic error in push_negotiation cb
When a user returns `-1` in a `push_negotiation` callback, we set the
error to whatever's hanging out in the buffer, probably something about
a missing configuration entry.

Clear the error buffer before invoking the callback, so that if a user
does not set an error message in their callback that we can detect. If
there is no error but `-1` is returned, set a generic error message.
2023-12-14 10:51:34 +00:00
Edward Thomson
a52685fd04 Merge pull request #6662 from kempniu/enable-deepening-and-shortening-shallow-clones
fetch: enable deepening/shortening shallow clones
2023-12-14 10:44:49 +00:00
Edward Thomson
175c6fb0a3 Merge pull request #6659 from boretrk/fixwarn
util: suppress some uninitialized variable warnings
2023-12-14 10:40:49 +00:00
Edward Thomson
aea6eaf8e1 Merge pull request #6666 from csware/fix-macro-redifinition
Avoid macro redefinition of ENABLE_INTSAFE_SIGNED_FUNCTIONS
2023-12-14 09:55:52 +00:00
Edward Thomson
3bee8d5f15 Merge pull request #6673 from csware/git2-noargs
git2: Fix crash when called w/o parameters
2023-12-14 09:54:02 +00:00
Sven Strickroth
f247a3f59f git2: Fix crash when called w/o parameters
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2023-12-14 09:38:18 +01:00
Kevin Saul
731af14be3 repo: add oid type support to git_repository_new 2023-12-14 16:59:59 +13:00
Edward Thomson
cc965243d6 process: test /usr/bin/false on BSDs
Our process tests were previously testing that false is
`/bin/false` everywhere except macOS, where it exists as
`/usr/bin/false`. . Extend this to all BSDs.
2023-12-13 16:40:00 +00:00
Sven Strickroth
a6164cb4f1 Avoid macro redefinition of ENABLE_INTSAFE_SIGNED_FUNCTIONS
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2023-12-09 17:49:55 +01:00
Edward Thomson
b49b8dbe19 Merge pull request #6664 from libgit2/ethomson/ci-macos
ci: overwrite nonsense in /usr/local during macOS setup
2023-12-08 16:58:13 +00:00
Edward Thomson
e002004686 ci: use Ninja on macOS 2023-12-08 16:22:44 +00:00
Edward Thomson
e8ed8dae62 ci: install fewer brew dependencies on macOS
GitHub Actions has borked their homebrew setup by first `brew
installing` things into `/usr/local` _and then_ putting their
own things in their place (eg `python`).

This breaks Homebrew, since it thinks it has `python` installed, but
it's actually something else.

Try to avoid using things that are in this bad state.

https://github.com/orgs/community/discussions/78266
2023-12-08 16:11:16 +00:00
Michał Kępień
4ed1bd1578 fetch: enable deepening/shortening shallow clones
A shallow repository can currently only be completely unshallowed, which
is caused by mark_local() only marking locally-existing objects as
wanted if the fetch depth is set to INT_MAX (GIT_FETCH_DEPTH_UNSHALLOW).
This prevents deepening the history of a shallow clone to an arbitrary
number of commits, which may be preferable over full unshallowing for
large repositories.

Enable deepening and shortening shallow clones by marking
locally-existing objects as wanted whenever the fetch depth is set to
any non-default value (either GIT_FETCH_DEPTH_UNSHALLOW or an arbitrary
positive integer).
2023-12-06 11:50:29 +01:00