| 96 | } |
| 97 | |
| 98 | void 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 | |
| 121 | void GitClientPrivate::gitLog(const QString &workspace, const QString &filePath, bool isProject) |
| 122 | { |
no test coverage detected