| 543 | } |
| 544 | |
| 545 | KDevelop::VcsJob * GitPlugin::commitStaged(const QString& message, const QUrl& repoUrl) |
| 546 | { |
| 547 | if (message.isEmpty()) |
| 548 | return makeVcsErrorJob(i18n("No message specified"), this); |
| 549 | const QDir dir = dotGitDirectory(repoUrl); |
| 550 | if (!ensureValidGitIdentity(dir)) { |
| 551 | return makeVcsErrorJob(i18n("Email or name for Git not specified"), this); |
| 552 | } |
| 553 | auto* job = new GitJob(dir, this); |
| 554 | job->setType(VcsJob::Commit); |
| 555 | *job << "git" << "commit" << "-m" << message; |
| 556 | return job; |
| 557 | } |
| 558 | |
| 559 | |
| 560 | bool GitPlugin::ensureValidGitIdentity(const QDir& dir) |
no test coverage detected