Commit e568d14b authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Use commit encoding for interactive rebase and commit editors

Task-number: QTCREATORBUG-11115

Change-Id: Ie922d94d66bed2882d3fc2b8b2de1bdc328d4d1c
Reviewed-by: default avatarAndré Hartmann <>
Reviewed-by: default avatarTobias Hunger <>
parent 86d7916b
......@@ -46,6 +46,7 @@
#include <QRegExp>
#include <QSet>
#include <QTemporaryFile>
#include <QTextCodec>
#include <QDir>
#include <QTextCursor>
......@@ -325,14 +326,16 @@ void GitEditor::addDiffActions(QMenu *menu, const VcsBase::DiffChunk &chunk)
bool GitEditor::open(QString *errorString, const QString &fileName, const QString &realFileName)
bool res = VcsBaseEditorWidget::open(errorString, fileName, realFileName);
Core::Id editorId = editor()->id();
if (editorId == Git::Constants::GIT_COMMIT_TEXT_EDITOR_ID
|| editorId == Git::Constants::GIT_REBASE_EDITOR_ID) {
QFileInfo fi(fileName);
const QString gitPath = fi.absolutePath();
const QString commitEncoding = GitPlugin::instance()->gitClient()->commitEncoding(gitPath);
return res;
return VcsBaseEditorWidget::open(errorString, fileName, realFileName);
QString GitEditor::decorateVersion(const QString &revision) const
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment