MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / instantBlame

Method instantBlame

src/plugins/git/client/gitclient.cpp:98–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98void GitClientPrivate::instantBlame()
99{
100 GitCommand *cmd = new GitCommand(currentWorkspace);
101 connect(cmd, &GitCommand::finished, this, [cmd, this](int code) {
102 if (code == 0) {
103 const auto &stdOut = cmd->cleanedStdOut();
104 if (!stdOut.isEmpty())
105 ibWidget->setInfo(stdOut.first());
106 } else {
107 qWarning() << cmd->cleanedStdErr();
108 }
109
110 cmd->deleteLater();
111 });
112
113 const QString lineString = QString("%1,%1").arg(currentLine);
114 QStringList arguments = { "blame", "-p" };
115 arguments.append({ "-L", lineString, "--", currentFilePath });
116 cmd->addJob(GitBinaryPath, arguments);
117
118 cmd->start();
119}
120
121void GitClientPrivate::gitLog(const QString &workspace, const QString &filePath, bool isProject)
122{

Callers 1

Calls 9

connectFunction · 0.85
cleanedStdOutMethod · 0.80
cleanedStdErrMethod · 0.80
addJobMethod · 0.80
QStringClass · 0.50
isEmptyMethod · 0.45
setInfoMethod · 0.45
appendMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected