Use diff transcoding
Administer Bitbucket Data Center
- Users and groups
- 高度なリポジトリ管理
- 外部ユーザー ディレクトリ
- グローバル権限
- Setting up your mail server
- アトラシアン アプリケーションとの連携
- Connect Bitbucket to an external database
- Migrating Bitbucket Data Center to another server
- Migrate Bitbucket Server from Windows to Linux
- Run Bitbucket in AWS
- Specify the Bitbucket base URL
- Configuring the application navigator
- アプリの管理
- 監査ログの表示と設定
- セキュリティ上の脅威を監視する
- Update your license key
- Configuration properties
- Bitbucket のコンテキスト パスを変更する
- Data recovery and backups
- Git リポジトリへの HTTP(S) アクセスの無効化
- Mirrors
- Bitbucket Mesh
- プロジェクトとリポジトリのエクスポートとインポート
- Git Large File Storage
- Git Virtual File System (GVFS)
- Git リポジトリへの SSH アクセスを有効にする
- Signed system commits
- シークレット スキャン
- Use diff transcoding
- Change the port Bitbucket listens on
- Lockout recovery process
- Configure secure administrator sessions (websudo)
- プロキシとセキュアな Bitbucket
- High availability for Bitbucket
- Diagnostics for third-party apps
- Enabling JMX counters for performance monitoring
- Bitbucket guardrails
- Enable debug logging
- Scaling Bitbucket Data Center
- Add a shortcut link to a repository
- Administer code search
- Adding additional storage for your repository data
- Add a system-wide announcement banner
- アプリケーションを横断したプロジェクト リンクの構成
- レート制限でインスタンスの安定性を改善する
- Atlasssian Data Center アプリケーションで CDN を使用する
- Manage keys and tokens
- 他のアプリケーションにリンクする
- Setting a system-wide default branch name
- 非アクティブなプル リクエストを自動的に却下
- Secure Bitbucket configuration properties
- データ パイプライン
- アプリケーション パフォーマンスを監視する
このページの内容
関連コンテンツ
- 関連コンテンツがありません
Bitbucket Data Center supports transcoding for diffs. This allows it 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 the Bitbucket 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, formerly known as msysgit, has known issues with Unicode paths. Diff transcoding works on all supported versions of Git for Windows, but 1.8.0 or higher is required to support Unicode paths.
Enabling diff transcoding
Diff transcoding must be explicitly enabled for each repository (unlike source view transcoding, which is always performed).
Repository administrators can enable diff transcoding on the repository settings page:
Performance and scaling
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 features.
When transcoding is enabled, git diff
writes the before and after blobs to temporary files and invokes the textconv
script once for each file. The script Bitbucket installs uses Perl to send a request back to Bitbucket with the path to each temporary file. Bitbucket then opens each file, detects the encoding using the same algorithm the source view uses, converts the file to UTF-8 and streams it out for git diff
to use. After git diff
has invoked the textconv
script the temporary files it created are deleted.
Writing the blobs to disk, starting Perl and calling back into Bitbucket are all overhead processing compared to performing a diff without transcoding. How much overhead that is varies by the size of the diff. When nominally-sized files containing two or three thousand lines or less are being compared the overhead is miniscule, under 50 milliseconds on an average server. However, when comparing larger files the overhead can result in a noticeable delay displaying the diff.
関連コンテンツ
- 関連コンテンツがありません