LoginSignup
0
0

More than 5 years have passed since last update.

JGitで.gitattributeはできないが、どのあたりにフックできるか検討

Posted at

JGitの3.0では.gitattributeは対応していない。
つまり、clean/smudgeフィルターも対応していない。

仕込むことができるかをソースを読んでいた結果、

org.eclipse.jgit.treewalk.WorkingTreeIterator

private InputStream filterClean(InputStream in)
このへんにcleanフィルター相当を仕込むことが出来そう。

org.eclipse.jgit.dircache.DirCacheCheckout

checkoutEntry(Repository repo, File f, DirCacheEntry entry, ObjectReader or)
ここにsmudgeフィルター相当を仕込むことが出来そう。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0