bin+lib scm-diff-editor

UI component to interactively select changes to include in a commit

2 unstable releases

0.8.0 Mar 15, 2025
0.4.0 Oct 9, 2024
Download history 136/week @ 2024-12-07 94/week @ 2024-12-14 59/week @ 2024-12-21 70/week @ 2024-12-28 102/week @ 2025-01-04 63/week @ 2025-01-11 63/week @ 2025-01-18 53/week @ 2025-01-25 93/week @ 2025-02-01 116/week @ 2025-02-08 88/week @ 2025-02-15 202/week @ 2025-02-22 56/week @ 2025-03-01 57/week @ 2025-03-08 207/week @ 2025-03-15 84/week @ 2025-03-22

449 downloads per month
Used in 15 crates (2 directly)

MIT/Apache

255KB
6.5K SLoC

About

Build status Latest version Docs License

scm-record is a Rust library for a UI component to interactively select changes to include in a commit. It's meant to be embedded in source control tooling.

You can think of this as an interactive replacement for git add -p, or a reimplementation of hg crecord/hg commit -i. Given a set of changes made by the user, this component presents them to the user and lets them select which of those changes should be staged for commit.

The scm-record library is directly integrated into these projects:

  • git-branchless: the git record -i command lets you interactively select and commit changes.
  • Jujutsu: as the built-in diff editor; see the ui.diff-editor configuration option.

Standalone executable

scm-diff-editor is a standalone executable that uses scm-record as the front-end. It can be installed via cargo:

$ cargo install --locked scm-diff-editor

The scm-diff-editor executable can be used with these tools:

Future work

Feature wishlist

Here are some features in the UI which are not yet implemented:

Integration with other projects

Here's some projects that don't use scm-record, but could benefit from integration with it (with your contribution):


lib.rs:

An interactive difftool for use in VCS programs like Jujutsu or Git.

Dependencies

~9–21MB
~288K SLoC