Git: Use MERGE_MSG as commit template when exists

Change-Id: I6aedc91309f8599004e467f9e733d7935fc9c266
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Orgad Shaneh
2011-12-11 15:04:59 +02:00
committed by Tobias Hunger
parent a5d70b9539
commit e7a2327206

View File

@@ -1659,7 +1659,9 @@ bool GitClient::getCommitData(const QString &workingDirectory,
*commitTemplate = sp.stdOut.mid(separatorPos + 1);
} else {
// Commit: Get the commit template
QString templateFilename = readConfigValue(workingDirectory, QLatin1String("commit.template"));
QString templateFilename = gitDir.absoluteFilePath(QLatin1String("MERGE_MSG"));
if (!QFileInfo(templateFilename).isFile())
templateFilename = readConfigValue(workingDirectory, QLatin1String("commit.template"));
if (!templateFilename.isEmpty()) {
// Make relative to repository
const QFileInfo templateFileInfo(templateFilename);