| 134 | } |
| 135 | |
| 136 | static QString getRemoteForCurrentBranch(const QString &repo, const QString &branch) |
| 137 | { |
| 138 | QProcess git; |
| 139 | const QStringList args{QStringLiteral("config"), QStringLiteral("branch.%1.remote").arg(branch)}; |
| 140 | if (!setupGitProcess(git, repo, args)) { |
| 141 | return {}; |
| 142 | } |
| 143 | |
| 144 | startHostProcess(git, QIODevice::ReadOnly); |
| 145 | if (git.waitForStarted() && git.waitForFinished(-1)) { |
| 146 | if (git.exitStatus() == QProcess::NormalExit && git.exitCode() == 0) { |
| 147 | return QString::fromUtf8(git.readAllStandardOutput().trimmed()); |
| 148 | } |
| 149 | } |
| 150 | return {}; |
| 151 | } |
| 152 | |
| 153 | QStringList PushPullDialog::buildCmdStrings(Mode m) |
| 154 | { |
no test coverage detected