Repository navigation
chore(deps): update Rust crate gix to 0.90.0 - #36
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.89.0→0.90.0Release Notes
GitoxideLabs/gitoxide (gix)
v0.90.0: gix v0.90.0Compare Source
New Features (BREAKING)
add worktree locking and a lock override that preserves changes
Expose
Worktree::set_lock(Option<&BStr>)andworktree::Proxy::set_lock()so callers can protect linked worktrees from pruning, moving, or removal,
including when their checkout is offline. Implement file handling in
gix_worktree::set_lock(): preserve byte-oriented reasons, append Git'strailing newline when needed, and make unlocking idempotent. Reject the
main worktree in the porcelain and avoid writing through lock-file symlinks.
Previously
Force::OverrideLockalso discarded local changes and initializedsubmodules. Add
Force::OverrideLockKeepChangesto bypass just the lock check,retaining status and submodule validation. This expands an exhaustive public
enum, so adapt the Tix caller in the same commit; existing CLI force levels
retain their behavior.
Git reference:
v2.56.0-116-g6de20f6092(
6de20f6092dcf9bdb1c8efe03db4b70c82b423dd),builtin/worktree.clock/unlock/removal,
wrapper.cnewline encoding, andt/t2403-worktree-move.sh. Git'sworktree remove -ffbypasses both lock andcleanliness checks; the new mode deliberately permits bypassing only the lock.
exposes a pre-existing unresolved
with_fetch_optionslink in clone docs.Test
one-pass deletion leaves files while default retries finish.
Performance
Reverted (BREAKING)
max-performance-safefeaturegixalways useszlib-rs, so the safe bundle no longer differs frommax-performance. Makemax-performanceown the default cache setup andupdate defaults, cache tests, and developer commands. Downstream users of
the removed name must select
max-performanceinstead.New Features
add
Submodule::resolved_url()for cloningDefinitely went through the tests quickly, besides the usual
'make it a shell script', but poked the URL resolution and Windows
special cases.
Some of the newly added drive-prefix tests are truly from another world,
and I don't think I could ever have written those, for better or worse.
Relative submodule URLs in
.gitmodulesrefer to the superproject'supstream, even when that upstream uses
ssh://,git://, or SCP syntax.Passing the existing
Submodule::url()result directly to a clone treats./and../entries as local paths instead.Document
url()as the raw configured accessor and addresolved_url()for cloning or fetching. Port Git's byte-oriented
relative_url()rulesfrom
remote.c, select the current branch's remote or the default remote,and fall back to the superproject itself when the selected URL is missing.
Make local paths absolute so the result does not depend on the caller's
working directory. Honor configuration overrides as initialized URLs,
avoiding a second remote-relative resolution of local URLs written by
git submodule init.Validate transport and local URLs, traversal errors, default-remote
selection, initialized overrides, unborn and bare repositories, and
non-UTF-8 local paths in disposable repositories. Compare resolution with
git submodule init; include native-separator coverage for Windows.expose selected global attribute paths
Allow callers that retain detached diff results to track the attribute files
selected by the repository. Reuse the existing resolver so permissions,
configuration interpolation, fallback paths, and precedence stay consistent
with the attribute stack.
Return selected paths even when files are missing so their later creation can
invalidate cached results. Per-directory attributes and
info/attributesremain separate because their locations are already known to the caller.
provide safe interrupt setup and handle
SIGHUPApplications that only need the shared cancellation flag should not have to
supply an unsafe signal callback. Add
interrupt::init_handler_default()as asafe entry point while preserving the callback and grace policy of an existing
registration, including when a UI runs inside the
gixcommand.Treat Unix
SIGHUPlike the other termination signals so long-running work canobserve cancellation and callers can restore terminal state before exiting.
It previously bypassed the shared flag and terminated immediately. Repeated
signals retain the existing forced-termination policy.
Exercise all supported termination signals and nested safe registration in
isolated subprocesses. Four interrupt tests pass with the feature enabled and
two pass without it.
add
Remote::default_branch()to learn the default branch of a remote without connecting to it.git cloneandgit remote set-headrecord the default branch of a remote in the symbolic referencerefs/remotes/<name>/HEAD, which points to the remote-tracking branch of that branch, likerefs/remotes/origin/main. Since Git 2.48,git fetchalso creates it if it's missing.make repository paths absolute without reloading
Went through the tests quite quickly, thinking their are deep and thorough
as usual.
Relative repository paths depend on the process current directory. Changing it
after opening a repository can redirect checkout validation, Git-link handling,
HEAD and object reads, or index persistence away from the intended repository.
Add
Repository::make_paths_absolute()to anchor the selected Git directory,common directory, worktree, index, and object database to the CWD captured at
opening. Unlike
reload(), this keeps runtime configuration, reference namespaces,and in-memory objects. Join paths lexically so missing worktrees remain supported
and destination symlinks are still rejected. Leave existing clones unchanged,
avoid partial updates on failure, and make repeated calls a no-op.
Recreate relative reference and object stores through their existing APIs.
Reset caches carrying relative index paths or store-specific pack IDs while
preserving outstanding snapshots.
Use an anchored repository view for initial checkout, and anchor global attribute
paths before optional-file metadata checks. Document the interpolation helper
and its captured-directory behavior.
Cover CWD changes, main and linked worktrees, bare repositories, missing checkouts,
index overrides, retained runtime state, idempotence, and failed reconstruction.
Include a Windows-only test for rejecting unresolved drive-relative index paths
without partially updating the repository.
separate linked worktree registration from checkout
Skipped over the tests, knowing they are very detailed
can be trusted by now.
Add
Repository::prepare_add_worktree()with consuming checkout and explicitpersistence. Persisted repositories can run their initial checkout later, even
after their checkout directory is removed, while failed unpersisted checkouts
roll back their owned data.
Bug Fixes
create SHA-256 repositories for
object_hash: Nonein SHA-256-only buildsPreviously a SHA-1 repository was created that the same build couldn't open.
Now
Nonefalls back to the build's default object format.respect section trust for filesystem path protections
GHSA-q54r-jf2p-rfr2 reports that path-protection configuration did not
respect the section filter used for security-relevant settings. Use the
filter for
core.protectHFS,core.protectNTFS, andgitoxide.core.protectWindows, including the latter's early read for thereference store. Keep platform defaults and boolean error handling intact.
Read-only fixtures exercise local and worktree configuration, full and
reduced trust, custom filters, trusted API overrides, and malformed
values in strict and lenient mode. Before the fix, reduced-trust settings
replaced the defaults and a rejected malformed Windows setting prevented
opening. Validation also exercises representative path names.
Git baseline: the local Git reference identifies itself as
v2.56.GIT.Its
t/t1014-read-tree-confusing.shandread-cache.c:verify_path_internalcover filesystem-specific path protections. Git's ownership policy in
setup.c:ensure_valid_ownershiprejects dubious ownership, whereasgixsupports reduced trust by filtering configuration.
match Git clone reference handling and preserve offline defaults
The prior CI run failed
check-modebecausemake_clone_refs.shhad ashebang without its executable bit. Its ARM32 tests also ran Git 2.47.3,
which rejects
clone --revision; the matrix mistook that unsupportedoption for a clone failure and disagreed with successful
gixclones.Mark the fixture executable and detect revision support from
git clone -h.Skip only revision baselines on older Git, retaining all 72 other cases
and the independent
gixrevision tests. Modern Git still exercises all81 baseline cases. Capture help despite its expected nonzero exit status.
match Git clone reference handling and preserve offline defaults
gixclones recorded remoteHEADas a direct object ID, losing thebranch relationship needed by later fetches and
Remote::default_branch().Bare clones also used the ordinary remote-tracking layout, while detached
remote heads and custom destinations selected different references from
git clone.Match Git's clone orchestration and reference selection:
refs/heads/*, without a default persistedfetch refspec, tracking
HEAD, or branch upstream configuration. Keepexplicit refspecs persistent and use
WithWorktreeplusfetch_only()for ordinary clones without a checkout.
detached
HEAD, preferringinit.defaultBranch, thenmaster, then thefirst matching branch by name. Record the selected branch's first mapped
peer before updating local
HEAD, including overwriting a branch namedHEAD; omit trackingHEADwhen the selected target is excluded.HEAD, and align shallow selection, tag policy, initial packed-referencereflogs, and persisted revision configuration with Git. Preserve the
reference directory required for repository discovery.
Preserve fetch-source identity when deriving an offline default branch.
Recognize
refs/heads/sources and exactheads/<name>sources, includingan exact source whose mapping was deduplicated against a glob. Return
Nonefor sources whose branch cannot be identified offline, count allambiguous mappings, and share reverse mapping with upstream-branch lookup.
Consult Git's
builtin/clone.candremote.c, and add deterministicGit-produced baselines for 27 cases in normal, no-checkout, and bare modes.
Compare complete references, relevant configuration, reflog IDs, checkout
contents, shallow boundaries, and success or failure with installed Git.
Keep source fixtures read-only and read their existing refs through
gix.Update API docs, CLI help and update printing, and affected clone/fetch tests.
Known difference: replacing a direct branch named
HEADwith the trackingsymref logs a null old object ID in
gix-ref; Git logs the resolved target.The baseline test explicitly checks this exception. Replacement-only custom
refspecs remain a
gixextension rather than being compared with Git'ssupplementary clone mappings.
resolve linked worktree submodules in their private Git directory
Git stores each linked superproject's submodule repositories under
.git/worktrees/<id>/modules/<name>, separately from the main worktree's.git/modules/<name>repositories. Usingcommon_dir()forSubmodule::git_dir()could open the main worktree's submodule beforeinitialization or after deinitialization of the linked submodule.
Derive the path from the superproject's
git_dir()instead. Preserve namevalidation and the precedence of an existing submodule
.gitfile.Cover initial checkout, initialization, and deinitialization using Git to
populate a disposable linked worktree created by
gix. Check that the mainsubmodule remains populated and that linked repository state and opening
follow its own lifecycle.
honor replacement refs and bypass stale commit graphs
Enable standard replacement refs by default and honor
core.useReplaceRefswith the same polarity as Git. The presence of
GIT_NO_REPLACE_OBJECTSdisables them regardless of its value.
Commit graphs contain original parent links, so skip them while object
replacements are active, including when a caller forces or supplies a
cache. Per-handle raw reads can still use the graph. Document the corrected
opening and graph behavior.
The regression first failed on the original code, then passed for ordinary
open/discovery in bare and non-bare repositories, reopening after a graft,
configuration and environment disablement, explicit raw reads, supplied
and forced graphs, merge-base, and graph removal. All 503
gixintegrationtests passed; the regression also passed with only
revision,sha1enabled.Native rebuilt
gix logandtix showmatch Git across two grafts in bothrepository kinds with pre-existing raw graphs.
Commit Statistics
Commit Details
view details
b8ef9ea)6260a55)Commit::short_id()doctest (75ca154)object_hash: Nonein SHA-256-only builds (521b3b2)36aaf51)7a22948)0a49d46)779b6c0)86d5fa6)38beb4d)7439578)8c513c5)Submodule::resolved_url()for cloning (41cb46f)a6f95af)SIGHUP(840faa0)7540f69)ad0202e)1cc509b)aa7eaea)Remote::default_branch()to learn the default branch of a remote without connecting to it. (2ddcae4)eae2fef)31185ff)79f3880)862e9c3)ca9eb08)2d8dcc4)core.longpathswhen initializing linked-submodule fixtures (7edbf02)6d1b686)54234a6)2711f6a)1b6d8da)max-performance-safefeature (7467af0)b94cd79)32a27be)e3b7670)5fccccf)Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.