7 stable releases

1.1.7 Oct 26, 2024
1.1.6 Feb 23, 2024
1.1.1 Dec 29, 2023

#372 in Build Utils

Download history 20/week @ 2024-07-23 9/week @ 2024-07-30 1/week @ 2024-09-17 12/week @ 2024-09-24 109/week @ 2024-10-22 19/week @ 2024-10-29 5/week @ 2024-11-05

133 downloads per month

BSD-3-Clause

13KB
298 lines

Lockdiff

Convert a lock with lots of info to something more readable

For instance:

[[package]]
name = "foo"
version = "1.4"

becomes:

foo@1.4

Using lockdiff with git

The primary purpose of this tool is to hide "noise" related to package changes in automatically generated files such as Cargo.lock when using with git diff and related commands.

For this to work, you need to register the 'lockdiff' as a text converter in your git config (usually ~/.config/git/config)

[diff "lockdiff"]
textconv = lockdiff

and then tell git to use lockdiff when diffing files, in ~/.config/git/attributes:

Cargo.lock diff=lockdiff

Supported locks

  • Cargo.lock
  • composer.lock
  • go.sum (beta)
  • poetry.lock (fun fact, Poetry and Cargo have compatible formats 😎)
  • package-lock.json
  • yarn.lock

Dependencies

~1.7–2.7MB
~56K SLoC