Commit 893b1e9a authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Git: Support commit.template under ~

Task-number: QTCREATORBUG-9530

Change-Id: I21ee4202aa750a9d4d89f05d51af7c63489eb6c3
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 338e9a09
......@@ -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);
......
Markdown is supported
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