| 965 | } |
| 966 | |
| 967 | VcsJob* GitPlugin::currentBranch(const QUrl& repository) |
| 968 | { |
| 969 | auto* job = new GitJob(urlDir(repository), this, OutputJob::Silent); |
| 970 | job->setIgnoreError(true); |
| 971 | *job << "git" << "symbolic-ref" << "-q" << "--short" << "HEAD"; |
| 972 | connect(job, &DVcsJob::readyForParsing, this, &GitPlugin::parseGitCurrentBranch); |
| 973 | return job; |
| 974 | } |
| 975 | |
| 976 | void GitPlugin::parseGitCurrentBranch(DVcsJob* job) |
| 977 | { |