GitClient: Call done handlers also in case of an error

This removes the "Precedes: <resolving>" label when
doing git show on a very fresh, local commit.

The same fix applies to "Branches", though not sure if
it's possible that there is no branch.

Change-Id: I08614d47b229bd04256de1a059876d679cc57b99
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2024-07-08 19:33:23 +02:00
parent faff9bb220
commit 6c2c287335

View File

@@ -372,7 +372,6 @@ ShowController::ShowController(IDocument *document, const QString &id)
};
const Storage<ReloadStorage> storage;
const Storage<QString> diffInputStorage;
const auto updateDescription = [this](const ReloadStorage &storage) {
QString desc = storage.m_header;
@@ -523,13 +522,13 @@ ShowController::ShowController(IDocument *document, const QString &id)
noColorOption, decorateOption, id}));
VcsOutputWindow::appendCommand(process.workingDirectory(), process.commandLine());
};
const Storage<QString> diffInputStorage;
const auto onDiffDone = [diffInputStorage](const Process &process) {
*diffInputStorage = process.cleanedStdOut();
};
const Group root {
storage,
diffInputStorage,
parallel,
onGroupSetup([this] { setStartupFile(VcsBase::source(this->document()).toString()); }),
Group {
@@ -539,12 +538,13 @@ ShowController::ShowController(IDocument *document, const QString &id)
parallel,
finishAllAndSuccess,
onGroupSetup(desciptionDetailsSetup),
ProcessTask(onBranchesSetup, onBranchesDone, CallDoneIf::Success),
ProcessTask(onPrecedesSetup, onPrecedesDone, CallDoneIf::Success),
ProcessTask(onBranchesSetup, onBranchesDone),
ProcessTask(onPrecedesSetup, onPrecedesDone),
TaskTreeTask(onFollowsSetup)
}
},
Group {
diffInputStorage,
ProcessTask(onDiffSetup, onDiffDone, CallDoneIf::Success),
postProcessTask(diffInputStorage)
}