GitClient: Change synchronousStashList() signature

Get rid of unused errorMessage arg.
Return the stash list directly.

Change-Id: I9bf156c5ecda476a5def3c3490d6cb13d011a3cd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2024-01-20 16:59:51 +01:00
parent ee09a28e83
commit cbec5438b4
4 changed files with 16 additions and 24 deletions

View File

@@ -399,9 +399,8 @@ bool BranchView::checkout()
if (gitClient().gitStatus(m_repository, StatusMode(NoUntracked | NoSubmodules)) != GitClient::StatusChanged)
branchCheckoutDialog.foundNoLocalChanges();
QList<Stash> stashes;
gitClient().synchronousStashList(m_repository, &stashes);
for (const Stash &stash : std::as_const(stashes)) {
const QList<Stash> stashes = gitClient().synchronousStashList(m_repository);
for (const Stash &stash : stashes) {
if (stash.message.startsWith(popMessageStart)) {
branchCheckoutDialog.foundStashForNextBranch();
break;
@@ -433,10 +432,9 @@ bool BranchView::checkout()
if (moveChanges) {
gitClient().endStashScope(m_repository);
} else if (popStash) {
QList<Stash> stashes;
QString stashName;
gitClient().synchronousStashList(m_repository, &stashes);
for (const Stash &stash : std::as_const(stashes)) {
const QList<Stash> stashes = gitClient().synchronousStashList(m_repository);
for (const Stash &stash : stashes) {
if (stash.message.startsWith(popMessageStart)) {
stashName = stash.name;
break;