Source linked

Git 2.55 Now Requires Rust to Build Unless You Opt Out

about.gitlab.com@systems_wire4 hours ago·Developer Tools·3 comments

The Git project makes Rust a build-time dependency by default for source compilers, plus fsmonitor lands on Linux and batch blob fetching speeds up partial clones.

gitgitlabrustfsmonitorpartial clonedeveloper tools

If you build Git from source, 2.55.0 just made Rust a required dependency unless you explicitly disable it with make NO_RUST=YesPlease or meson configure -Drust=disabled. That's a deliberate hardening of the Rust-onboarding pipeline that started in Git 2.49 with experimental bindings and hit production code in 2.52 with the varint subsystem. No user-facing impact — this only affects people compiling Git themselves, but it signals where the project is heading.

git history fixup Kills the Two-Step Rebase Dance

You know the drill: stage your changes, create a fixup commit with git commit --fixup=<id>, then fire up an interactive rebase with --autosquash. Git 2.55 replaces that with git history fixup <commit-id>. It amends staged changes directly into the target commit, and because it uses git-history(1), every local branch that contains that commit gets automatically rebased. Patrick Steinhardt implemented this. Stacked-branch workflows just got substantially less painful.

Linux Finally Gets a Built-in fsmonitor Daemon

core.fsmonitor has been a boolean since Git 2.36, but the built-in daemon only worked on macOS and Windows. Git 2.55 adds Linux support via inotify(7) — chosen over fanotify(7) because the latter requires elevated privileges. The trade-off: the daemon places a watcher on every directory in the repo, so you may need to bump fs.inotify.max_user_watches on large monorepos. Paul Tarjan, Eric DeCosta, and Marziyeh Esipreh made this happen.

Push to a Group of Remotes (Finally)

git fetch has supported remote groups for years: git config set remotes.forks "origin upstream" lets you fetch all forks at once. Git 2.55 closes the gap: git push forks main now pushes the specified refs to every remote in the group, each honoring its own push mapping and mirror settings. Usman Akinyemi submitted this, prompted by Junio C Hamano.

Trim Your Commit Graph Width

git log --graph can explode to nine lanes wide in just 30 commits on git.git. Pablo Sabater added --graph-lane-limit=<n>. Set it to 5, and any lanes beyond that get replaced with a ~ truncation mark. The commit messages stop getting shoved off the right side of your terminal. Default is 0 (no limit), and negative values behave the same way — think --max-parents semantics.

Batch Blob Downloads Speed Up Partial Clone Greps

Partial clones (git clone --filter=blob:none) skip content, but commands like git grep and git cherry need those blobs. Previously each missing blob triggered a separate round-trip. Elijah Newren batched the downloads into a single negotiating round-trip with the server in Git 2.55. Searching TODO 100 commits back in a partial clone just got significantly faster.

The Rust requirement is the headline, but the practical improvements — fsmonitor on Linux, batched blob fetching, and git history fixup — will save engineers time every single day. Expect the Rust dependency to become non-optional in a future release, so start prepping your build tooling now.


Source: What's new in Git 2.55.0?
Domain: about.gitlab.com

Read original source ->

External source stays available while the OJO article and comment thread stay local.

Comments load interactively on the live page.