Git: Fix assertion when upstream branch no longer exists

Change-Id: I5033d43571026ab0d9b8b94892b4075e130211be
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Orgad Shaneh
2022-01-31 11:29:46 +02:00
committed by Orgad Shaneh
parent ce27886eeb
commit b0d572789b

View File

@@ -911,6 +911,8 @@ void BranchModel::updateUpstreamStatus(BranchNode *node)
VcsCommand *command = d->client->asyncUpstreamStatus( VcsCommand *command = d->client->asyncUpstreamStatus(
d->workingDirectory, node->fullRef(), node->tracking); d->workingDirectory, node->fullRef(), node->tracking);
QObject::connect(command, &VcsCommand::stdOutText, node, [this, node](const QString &text) { QObject::connect(command, &VcsCommand::stdOutText, node, [this, node](const QString &text) {
if (text.isEmpty())
return;
const QStringList split = text.trimmed().split('\t'); const QStringList split = text.trimmed().split('\t');
QTC_ASSERT(split.size() == 2, return); QTC_ASSERT(split.size() == 2, return);