forked from qt-creator/qt-creator
Git: Support user configured comment character
Task-number: QTCREATORBUG-28042 Change-Id: I96aea27434ba138637728a7fd7d1450e1eee260a Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
a50afa486a
commit
45aa6a12c4
@@ -2780,6 +2780,8 @@ bool GitClient::getCommitData(const FilePath &workingDirectory,
|
||||
*errorMessage = msgNoCommits(false);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
commitData.commentChar = commentChar(repoDirectory);
|
||||
}
|
||||
const StatusResult status = gitStatus(repoDirectory, ShowAll, &output, errorMessage);
|
||||
switch (status) {
|
||||
@@ -3550,6 +3552,12 @@ QString GitClient::readConfigValue(const FilePath &workingDirectory, const QStri
|
||||
return readOneLine(workingDirectory, {"config", configVar});
|
||||
}
|
||||
|
||||
QChar GitClient::commentChar(const Utils::FilePath &workingDirectory)
|
||||
{
|
||||
const QString commentChar = readConfigValue(workingDirectory, "core.commentChar");
|
||||
return commentChar.isEmpty() ? QChar(Constants::DEFAULT_COMMENT_CHAR) : commentChar.at(0);
|
||||
}
|
||||
|
||||
void GitClient::setConfigValue(const FilePath &workingDirectory, const QString &configVar,
|
||||
const QString &value) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user