Bug Fixes
-
accept git's 12-bit hex color shorthand
git-config(1)documents two hex forms: "24-bit RGB values as hex, like
#ff0ab3, or 12-bit RGB values like #f1b, which is equivalent to the 24-bit
color #ff11bb". Only the 24-bit form was parsed, because the hex branch
required exactly six digits, so#f1bwas rejected as an invalid color.Both lengths are now handled, with each shorthand digit doubled to make
the byte, which is whatgitdoes. The expected values in the new test
were recorded fromgit config --type=coloron git 2.50.1. -
accept
0bintegers
C23strtoimax()recognizes binary prefixes during base-0 parsing, while older
platform implementations may not.Accept the syntax consistently across platforms for signed and suffixed binary
values while preserving rejection of signs after the prefix.
Changed (BREAKING)
-
migrate errors to gix-error
Rubber stamp
-
raise MSRV to Rust 1.88
The newly published
dua-core3.3 release used by linked-worktree removal
requires Rust 1.88, so raise every workspace crate and the advertised badge
together.Keep the MSRV checks buildable by selecting the latest
sysinfoandrusqlite
release lines that support Rust 1.88.
Bug Fixes (BREAKING)
-
expand
~and~userlikegitdoes
Git expands~and~userpaths viainterpolate_path()inpath.c.
Ingix-config-value,Path::interpolate()previously required a trailing
slash for the current user (~/) and required a slash for named users
(self.starts_with(b"~") && self.contains(&b'/')). Consequently:- A standalone
~was left unexpanded as a literal"~". - A standalone
~userwithout a trailing slash was left unexpanded as a literal"~user". - A nonexistent user without a slash (
~nonexistent) silently returned the literal instead of producing a user lookup error.
Recorded from
git -c t.k=<input> config --type=path t.kon git 2.50.1:input git before after ~/home/user"~"/home/user~//home/user//home/user/home/user~/foo/home/user/foo/home/user/foo/home/user/foo~user/home/user"~user"/home/user~user//home/user//home/user/home/user~user/foo/home/user/foo/home/user/foo/home/user/foo~nonexistenterror "~nonexistent"error - A standalone
-
parse a boolean's number like
gitdoes
git_parse_maybe_bool_text()hands the numeric fallback to
git_parse_int(), so it takes the same bases andk/m/gsuffixes as
an integer and is bounded to a Cint. This used a plain decimal
i64::from_str, so0x0,1kand-0x10were refused while08and
values pastINT_MAXwere accepted.Routed through
Integer, which already matchesgitsince #2967.
Expectations recorded fromgit config --type=boolon git 2.50.1. -
parse integer bases the way
gitdoes
githands config integers tostrtoimax()with a base of0, so a0x
prefix means hexadecimal and a leading0means octal.Integer::try_from
used a plain decimal parse, which diverged from the reference implementation
in two ways:value git config --type=intgix-config-valuebefore0x1016error 0x10k16384error 0X1F31error -0x10-16error 010810The
010row is the reason for the!: a leading zero produced a different
number rather than an error, so any config written with a padded or octal
value was read as decimal without complaint.Numbers are now parsed by detecting the sign, then the base, keeping the sign
attached to the digits so thati64::MINstill parses (its magnitude alone is
out of range). The suffix path uses the same parser, so0x10kand010k
behave likegit.Expectations in
bases_match_gitare the recorded output of
git config --type=int --getunder git 2.50.1, including the valuesgit
itself rejects:08,09,0x,0xg,0b101and0o17.
Commit Statistics
- 20 commits contributed to the release over the course of 52 calendar days.
- 53 days passed between releases.
- 7 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Merge pull request #2847 from GitoxideLabs/gix-error-completion (6356013)
- Use borrowed error inspection throughout the workspace (daf73b5)
- Migrate errors to gix-error (de1716a)
- Merge pull request #2984 from justonemorenight/fix/config-path-tilde-parity (92b6508)
- Review (181297c)
- Merge pull request #2980 from rawsun007/config-value-bool-int-parity (4278d18)
- Expand
~and~userlikegitdoes (3a76a69) - Review (71d0f3c)
- Parse a boolean's number like
gitdoes (42055bd) - Merge pull request #2973 from rawsun007/config-value-hex-shorthand (083de56)
- Review (ec98f68)
- Accept git's 12-bit hex color shorthand (60a9fc3)
- Merge pull request #2967 from rawsun007/fix/config-integer-bases (b93054c)
- Accept
0bintegers (63afe1a) - Review (2e74518)
- Narrow the claims the base tests make about
git(11a31f7) - Parse integer bases the way
gitdoes (e8396e4) - Merge pull request #2949 from GitoxideLabs/error-conversion-review (a095334)
- Raise MSRV to Rust 1.88 (4b42e0c)
- Merge pull request #2867 from GitoxideLabs/fix-url-authority-parsing (cc3ee80)