#commit #ui #git #component #hg #interactive #control

bin+lib scm-record

UI component to interactively select changes to include in a commit

2 unstable releases

0.2.0 Dec 25, 2023
0.1.0 Aug 19, 2023

#139 in GUI

Download history 556/week @ 2023-12-23 811/week @ 2023-12-30 719/week @ 2024-01-06 744/week @ 2024-01-13 1142/week @ 2024-01-20 910/week @ 2024-01-27 2230/week @ 2024-02-03 1953/week @ 2024-02-10 1530/week @ 2024-02-17 1102/week @ 2024-02-24 1720/week @ 2024-03-02 1256/week @ 2024-03-09 1195/week @ 2024-03-16 1440/week @ 2024-03-23 2344/week @ 2024-03-30 1072/week @ 2024-04-06

6,220 downloads per month
Used in 17 crates (5 directly)

MIT/Apache

235KB
6K SLoC

License

MIT OR Apache-2.0

scm-record

scm-record is 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.

scm-record was originally developed as a supporting library for git-branchless.

scm-diff-editor

The scm-diff-editor binary is available when compiled with --features scm-diff-editor.

This is a standalone binary that uses the scm-record library as a front-end, and can be integrated directly into some source control systems:

Integration with other projects

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

Feature wishlist

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

  • Jump to next/previous element of same kind.
  • Edit one side of the diff in an editor.
  • Multi-way split UI to split a commit into more than 2 commits.
  • Support for use as a mergetool.
  • Commands to select ours/theirs for diffs representing merge conflicts.

Dependencies

~4–12MB
~103K SLoC