Skip to content

v0.6.0

Latest

Choose a tag to compare

@github-actions github-actions released this 24 Nov 20:52
· 6 commits to main since this release

Windows support: native sharing on ReFS and Dev Drive, adopt, Scoop and
npm installs. New worktrees are ready sooner, because their first git status
no longer rehashes every file. adopt reorganizes existing worktrees into one
layout, with offline compaction on macOS.

Added

  • Windows: native copy-on-write on ReFS and Dev Drive volumes through block
    cloning, with every shared byte verified as on macOS and Linux. NTFS volumes
    delegate to stock Git after one volume query. Builds on issue #4 (mateo-m)
    and PR #3 (InventingMaya). See RFD0027.
  • Windows: git twig adopt layout moves, --prepare and in-place --dedupe
    on ReFS, holding both files locked against writers from comparison until
    sharing. Files open for writing or mapped are skipped.
  • Windows: repositories with deep paths clone natively. Twig's staging is
    about 45 characters deeper than the worktree, so Git refused files there
    that it writes fine at the destination, and Twig fell back to stock Git.
    Git in staging now allows long paths. Without core.longpaths, a worktree
    with paths of 248 characters or more is left to Git.
  • Windows: files smaller than one cluster are written rather than block
    cloned, because cloning cannot share a partial cluster and would move both
    the donor and the copy out of ReFS's resident storage into clusters of
    their own. In-place dedupe leaves such files alone.
  • Windows CI on NTFS and a ReFS Dev Drive with native cloning required, and
    a Windows .zip in each release with its SHA-256.
  • npm: npm install -g git-twig on macOS (arm64, x64), Linux (x64, arm64,
    glibc) and Windows (x64). One package carries every release binary; nothing
    is downloaded at install time, and on macOS and Linux the command becomes the
    native binary, so Node does not start for each run.
  • Linux arm64 (aarch64-unknown-linux-gnu) release archives, also installed
    by the Homebrew formula on ARM Linux.
  • Homebrew, Scoop and npm installs say how to onboard a coding agent: ask it to
    run git twig skill and follow it. The website offers npm i -g git-twig
    beside the onboarding prompt.
  • Windows install with Scoop: scoop bucket add git-twig https://github.com/leostera/git-twig, then scoop install git-twig/git-twig.
    The release binary links the C runtime statically, so it runs without the
    Visual C++ Redistributable.
  • Converted files are shared: under core.autocrlf=true (the Git for Windows
    default), eol=crlf, ident or working-tree-encoding, a donor file is kept
    when it equals the bytes git archive produces for it. See RFD0028.
  • core.symlinks=false repositories no longer fall back: Git writes symlink
    entries as plain files while every other file stays shared.
  • twig-real-bench --filesystem windows-dev-drive measures space on fresh
    ReFS Dev Drives, counting the distinct clusters files reference, because
    ReFS volume free space moves by hundreds of MiB on its own.
  • Optional offline APFS compaction during adoption: --compact previews and
    applies verified native CoW replacements with supported target metadata and
    index contents preserved. Interactive use requires explicit saved/closed-tree
    confirmation; automation requires --compact --offline --yes. --move-only
    disables sharing. Old copies are retired only after verification with a native
    busy-file guard; failures retain both copies and a recovery journal. This is
    not safe live deduplication or a measured physical-space claim.
  • git twig adopt discovers registered worktrees, previews a sibling layout and
    asks before relocating the original clone and linked checkouts. A single
    --worktrees-dir option selects a root; omitted roots are prompted and saved
    per repository after success. An optional target adopts only one checkout.
  • adopt --dry-run previews without writes; noninteractive application requires
    --yes with an explicit or saved root. Atomic no-overwrite moves preserve
    dirty/staged/ignored work, repair Git links and retain a recovery journal.
    Cross-device, locked, colliding and submodule layouts are refused.
  • After adoption, git twig new -b <branch> can use the saved root without an
    explicit destination. Linux attempts in-place sharing after relocation; move-only
    macOS adoption reports sharing unchanged. Explicit v0.5 --prepare/--dedupe modes remain
    sharing-only and never replace live files.

Changed

  • Shared files are read once, not twice. The stat data of every verified file
    is recorded in the installed index, so the first git status in a new
    worktree no longer rehashes every file. Verification itself is unchanged
    (RFD0024). Issue #9 (dsfaccini).
  • Files under automatic text detection that git archive certifies also have
    their stat data recorded, so converted checkouts skip the rehash too.
  • README benchmark times include each new worktree's first git status, and
    their multipliers use the same totals. Issue #8 (dsfaccini).
  • README benchmarks compare git worktree and Twig on macOS APFS, Linux XFS,
    Btrfs and Windows Dev Drive side by side, from 0.6.0 raw runs on each platform.
  • On Linux, large inventories are cloned on up to eight threads.
  • A donor with deleted tracked files, or tracked paths replaced by a symlink,
    directory or other entry, no longer disables sharing for the whole worktree.
    Git writes those paths and the remaining files are still shared.
  • Clone normalization skips chmod for files that already have checkout
    permissions.

Fixed

  • adopt on a layout that is already adopted says nothing moved, rather than
    "Layout adopted".
  • macOS: files in a new worktree inherit ACL entries from the destination's
    parent, as files Git writes do. Whole-directory clones kept each donor file's
    own ACL; staging that inherited an ACL now clones file by file.
  • git twig new briefly creates its metadata bootstrap in .twig/ beside the
    destination, instead of a .git-twig-stage-* folder, and removes .twig/
    once it is empty.
  • Adoption and compaction no longer leave a .twig-adopt-* or .twig-compact-*
    folder beside the checkouts after every run. Compaction recovery lives in
    .git/twigs/compact. Adoption parks checkouts in one .twig/ folder beside
    the main clone, because main and its Git directory move through it. Both are
    removed once nothing needs recovering, and kept only after a failure.
  • adopt lists each checkout once, shows destinations relative to the root,
    and no longer previews compaction for macOS --yes runs, which only move.
  • git twig remove deletes worktrees whose absolute paths exceed the system
    limit (1024 bytes on macOS). Git unregistered them, failed with "File name
    too long" and left the directory behind. Twig finishes deleting only the
    checkout Git has just unregistered, so Git's checks for changes and locks
    still apply.
  • macOS offline compaction no longer reports its primitives unavailable when
    an indexer such as Spotlight briefly opens the capability probe's files.
  • SIGINT, SIGTERM or SIGHUP before registration removes this invocation's
    staging, which bulk directory clones can briefly fill with ignored files, and
    starts no stock Git fallback. Later interrupts still retain staging; SIGKILL
    cannot be handled. Issue #10 (dsfaccini).
  • A revision that moves while Twig verifies its clones no longer registers the
    moved commit: --detach registers the verified commit, and -b delegates to
    stock Git before registering if its start point moved. Issue #7 (dsfaccini).
  • Conditional config includes (includeIf) no longer force stock Git when the
    included files set only identity, signing, remote, credential or alias
    settings, which never change checkout bytes. Includes that set anything else,
    include further files, or use relative paths still delegate. From issue #4
    (mateo-m).
  • Windows: a repository on a volume mounted at a folder, rather than a drive
    letter, now clones natively. Twig asked which volume held the mount point
    itself and sent every creation to stock Git. Adoption no longer refuses a
    main checkout directly under such a folder.
  • core.eol=native is CRLF in Git for Windows; text paths are no longer left
    with LF line endings there.
  • Probe atomic no-overwrite directory renames before relocating any worktree.
    Drivers such as NTFS-3g that reject the primitive are refused without moving
    user data; there is no overwrite-prone ordinary-rename fallback.
  • Blobless partial clones no longer fetch one blob per file. Tree listings stop
    asking for blob sizes, and a target that needs blobs written by Git is left
    to stock Git, which fetches absent blobs in one batch.
  • On macOS, new worktrees no longer inherit the donor's extended attributes
    (including quarantine) or BSD flags such as hidden and immutable.
  • A branch name Git would refuse (already existing or invalid) is refused before
    any checkout is staged, so a mistyped command no longer retains a full clone.
  • Repositories with a separate Git directory, including submodules, share from
    the checkout Twig runs in rather than always delegating to Git.
  • Staging is removed even when a tracked path is too long under the staging
    prefix, or (exFAT) when ._name companion files vanish during removal.
  • Immutable donor files, tracked or ignored, no longer force a fallback and
    leave undeletable staging that retained ignored bytes under Git metadata.

Full changelog