forked from qt-creator/qt-creator
Git: Support commit.template under ~
Task-number: QTCREATORBUG-9530 Change-Id: I21ee4202aa750a9d4d89f05d51af7c63489eb6c3 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
338e9a092b
commit
893b1e9a16
@@ -2686,8 +2686,11 @@ bool GitClient::getCommitData(const QString &workingDirectory,
|
||||
QString templateFilename = gitDirectory.absoluteFilePath(QLatin1String("MERGE_MSG"));
|
||||
if (!QFile::exists(templateFilename))
|
||||
templateFilename = gitDirectory.absoluteFilePath(QLatin1String("SQUASH_MSG"));
|
||||
if (!QFile::exists(templateFilename))
|
||||
templateFilename = readConfigValue(workingDirectory, QLatin1String("commit.template"));
|
||||
if (!QFile::exists(templateFilename)) {
|
||||
Utils::FileName templateName = Utils::FileName::fromUserInput(
|
||||
readConfigValue(workingDirectory, QLatin1String("commit.template")));
|
||||
templateFilename = templateName.toString();
|
||||
}
|
||||
if (!templateFilename.isEmpty()) {
|
||||
// Make relative to repository
|
||||
const QFileInfo templateFileInfo(templateFilename);
|
||||
|
||||
Reference in New Issue
Block a user