Skip to content

Commit

Permalink
Refactor internalAfterFetch to use onUpdateCommitLog
Browse files Browse the repository at this point in the history
  • Loading branch information
soramimi committed Aug 30, 2024
1 parent 6dd4647 commit 9bfdb48
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 39 deletions.
30 changes: 0 additions & 30 deletions cmake/modules/Findzlib.cmake

This file was deleted.

12 changes: 5 additions & 7 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1801,10 +1801,8 @@ void MainWindow::internalAfterFetch()
{
ASSERT_MAIN_THREAD();

GitPtr g = git();
detectGitServerType(g);
queryCommitLog(frame(), g);
updateRemoteInfo(g);
detectGitServerType(git());
onUpdateCommitLog();
}

#define RUN_PTY_CALLBACK [this](ProcessStatus const &status, QVariant const &userdata)
Expand Down Expand Up @@ -1993,7 +1991,7 @@ void MainWindow::setupUpdateCommitLog()

void MainWindow::onUpdateCommitLog()
{
openRepositoryMain(frame(), git(), false, false, false, true);
openRepositoryMain(frame(), git(), false, false, true);
}

void MainWindow::updateCommitLog()
Expand Down Expand Up @@ -4303,7 +4301,7 @@ Git::Object MainWindow::catFile(QString const &id)

void MainWindow::internalOpenRepository(GitPtr g, bool fetch, bool keep_selection)
{
openRepositoryMain(frame(), g, true, true, fetch, keep_selection);
openRepositoryMain(frame(), g, true, fetch, keep_selection);
}

void MainWindow::makeCommitLog(RepositoryWrapperFrame *frame, int scroll_pos, int select_row)
Expand Down Expand Up @@ -4420,7 +4418,7 @@ void MainWindow::updateHEAD(GitPtr g)
setHeadId(head);
}

void MainWindow::openRepositoryMain(RepositoryWrapperFrame *frame, GitPtr g, bool query, bool clear_log, bool do_fetch, bool keep_selection)
void MainWindow::openRepositoryMain(RepositoryWrapperFrame *frame, GitPtr g, bool clear_log, bool do_fetch, bool keep_selection)
{
ASSERT_MAIN_THREAD();

Expand Down
2 changes: 1 addition & 1 deletion src/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class MainWindow : public QMainWindow {

void internalOpenRepository(GitPtr g, bool fetch, bool keep_selection);

void openRepositoryMain(RepositoryWrapperFrame *frame, GitPtr g, bool query, bool clear_log, bool do_fetch, bool keep_selection);
void openRepositoryMain(RepositoryWrapperFrame *frame, GitPtr g, bool clear_log, bool do_fetch, bool keep_selection);

QStringList selectedFiles_(QListWidget *listwidget) const;
QStringList selectedFiles() const;
Expand Down
2 changes: 1 addition & 1 deletion src/SubmoduleMainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ RepositoryWrapperFrame *SubmoduleMainWindow::frame()
void SubmoduleMainWindow::reset()
{
GitPtr g = git();
mainwindow()->openRepositoryMain(ui->frame_repository_wrapper2, g, true, true, true, false);
mainwindow()->openRepositoryMain(ui->frame_repository_wrapper2, g, true, true, false);

}

0 comments on commit 9bfdb48

Please sign in to comment.