Skip to content

Commit

Permalink
register npy as a git diff driver
Browse files Browse the repository at this point in the history
  • Loading branch information
tisba committed Aug 14, 2024
1 parent 3eb9009 commit 89d5225
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions etc/gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
Gemfile diff=ruby
Capfile diff=ruby
*_spec.rb diff=rspec
*.npy binary diff=npy
2 changes: 2 additions & 0 deletions etc/gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ color = auto
mnemonicprefix = true
[diff "rspec"]
xfuncname = "^[ \t]*((RSpec|describe|context|it|before|after|around|feature|scenario)[ \t].*)$"
[diff "npy"]
textconv = "python -c 'import numpy as np; import sys; np.savetxt(sys.stdout, np.load(sys.argv[1]), fmt=\"%s\", delimiter=\"\t\")'"
[log]
date = local
graph = true
Expand Down

0 comments on commit 89d5225

Please sign in to comment.