Simplify looking at diffs for lock files, such as Cargo.lock or poetry.lock
Find a file
2025-12-31 09:15:33 +01:00
.github/workflows Add powershell installer 2025-12-31 09:15:21 +01:00
src Cleanup 2025-12-31 09:05:36 +01:00
.gitignore Initial commit 2022-06-22 18:00:15 +02:00
bacon.toml Simplify bacon.toml 2023-12-29 14:23:10 +01:00
Cargo.lock Bump to 2.0.5 2025-12-31 09:15:33 +01:00
Cargo.toml Bump to 2.0.5 2025-12-31 09:15:33 +01:00
CHANGELOG.md Add powershell installer 2025-12-31 09:15:21 +01:00
dist-workspace.toml Add powershell installer 2025-12-31 09:15:21 +01:00
LICENSE Add a MIT LICENSE 2022-06-22 18:11:12 +02:00
README.md Improve README 2025-02-22 12:44:51 +01:00
skyspell-ignore.toml Add powershell installer 2025-12-31 09:15:21 +01:00
tbump.toml Bump to 2.0.5 2025-12-31 09:15:33 +01:00

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

Note: in case of requirements.txt, you may want to put the config in .git/info/attributes because sometimes the requirements.txt is maintained by hand and not generated by a tool like pip-compile.

Supported locks

  • Cargo.lock
  • Gemfile.lock
  • composer.lock
  • go.sum
  • package-lock.json
  • poetry.lock
  • pubspec.lock
  • shard.lock
  • yarn.lock
  • requirements.txt and similar (the file name must contain requirements and end with .txt, like in dev-requirements.txt)