Bitbucket Server で diff トランスコーディングを使用する
As of Bitbucket Server 3.1, Bitbucket Server supports transcoding for diffs. This allows Bitbucket Server to convert files in encodings like EUC-JP, GB18030 and UTF-16 to UTF-8, so they are processed correctly by git diff
, which only supports UTF-8. Similar transcoding has been applied to Bitbucket Server's source view since it was released, so this change brings the diff view in line with the source view. Diff transcoding is applied to commit and pull request diffs, as well as the diff-to-previous view.
Git for Windows (旧称 msysgit) には、Unicode パスに関する既知の問題があります。差分トランスコーディングはサポートされているすべてのバージョンの Git for Windows で機能しますが、Unicode パスをサポートするには 1.8.0 以降が必要です。
差分トランスコーディングを有効にする
差分トランスコーディングは (常に実行されるソース ビューのトランスコーディングとは異なり)、各リポジトリで明示的に有効化する必要があります。
リポジトリ管理者はリポジトリ設定ページで差分トランスコーディングを有効化できます。
パフォーマンスおよびスケーリング
There's a performance consideration with transcoding. It is implemented using Git's textconv
support, so using it adds overhead to displaying diffs. Where possible, the best approach, given git
only supports UTF-8 content, is to use UTF-8 encoding so that transcoding is not necessary. In repositories without non-UTF-8 content, diff transcoding should be left disabled. Other encodings are often a necessity, however, and for repositories containing such content enabling diff transcoding allows using the full range of Bitbucket Server features.