Skip to content

Instantly share code, notes, and snippets.

@oshow
Created March 28, 2011 11:27
Show Gist options
  • Save oshow/890311 to your computer and use it in GitHub Desktop.
Save oshow/890311 to your computer and use it in GitHub Desktop.
gitのdiff toolにdocdiffを設定する時の各ファイルの内容
◆docdiff.sh(ラッパー)
#!/bin/sh
[ $# -eq 7 ] && docdiff.rb --tty --digest "$2" "$5"
参考:http://twitter.com/#!/kdmsnr/status/16634034079
◆.gitconfig(の一部)
[diff "docdiff"]
command = docdiff.sh
◆.gitattributes(プロジェクトディレクトリで使う)
translation.txt diff=docdiff
@oshow
Copy link
Author

oshow commented Mar 28, 2011

これでtranslation.txtをgit diffしようとすると、自動的にdocdiff.rbが使われるようになる。

@oshow
Copy link
Author

oshow commented Mar 28, 2011

diff toolというか、diffドライバって言うのかな。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment