Skip to content

your-tools/lockdiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 conveter 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

About

Simplify looking at diffs for lock files, such as Cargo.lock or poetry.lock

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages