From 6c2c2873353a3b66d623ff9709f236a4ec5eebc5 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 8 Jul 2024 19:33:23 +0200 Subject: [PATCH] GitClient: Call done handlers also in case of an error This removes the "Precedes: " 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 --- src/plugins/git/gitclient.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index a44163110a2..b1ad8140fe8 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -372,7 +372,6 @@ ShowController::ShowController(IDocument *document, const QString &id) }; const Storage storage; - const Storage 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 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) }