Skip to content

fortio/delta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codecov

Delta

Diff 2 sets and apply command to deltas

Installation

If you have golang, easiest install is (will also be the smallest binary thanks to build tags and other arguments)

CGO_ENABLED=0 go install -tags no_json,no_net -trimpath -ldflags "-w -s" github.com/fortio/delta@latest

Or brew custom tap

brew install fortio/tap/delta

Otherwise head over to https://github.com/fortio/delta/releases for binary releases

Usage

delta -b "echo NEW:" -a "echo REMOVED:" oldFile newFile

if oldFile is

old1
old2
gone1
old3

and newFile is

new1
old1
old2
old3
new2

will output

REMOVED: gone1
NEW: new1
NEW: new2

See also delta.txtar for examples (tests)