Skip to content

Instantly share code, notes, and snippets.

@oshow
Created March 28, 2011 11:27
Show Gist options
  • Select an option

  • Save oshow/890311 to your computer and use it in GitHub Desktop.

Select an option

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

oshow commented Mar 28, 2011

Copy link
Copy Markdown
Author

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

@oshow

oshow commented Mar 28, 2011

Copy link
Copy Markdown
Author

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

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