Skip to content

Commit

Permalink
コミットダイアログが表示されるのに時間がかかることがあった問題を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
soramimi committed Feb 9, 2024
1 parent b643cc3 commit c17f735
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1816,6 +1816,9 @@ void MainWindow::commit(RepositoryWrapperFrame *frame, bool amend)
GitPtr g = git();
if (!isValidWorkingCopy(g)) return;

QList<gpg::Data> gpg_keys;
gpg::listKeys(global->appsettings.gpg_command, &gpg_keys);

QString message;
QString previousMessage;

Expand All @@ -1839,13 +1842,9 @@ void MainWindow::commit(RepositoryWrapperFrame *frame, bool amend)
Git::User user = g->getUser(Git::Source::Default);
QString sign_id = g->signingKey(Git::Source::Default);
gpg::Data key;
{
QList<gpg::Data> keys;
gpg::listKeys(global->appsettings.gpg_command, &keys);
for (gpg::Data const &k : keys) {
if (k.id == sign_id) {
key = k;
}
for (gpg::Data const &k : gpg_keys) {
if (k.id == sign_id) {
key = k;
}
}
CommitDialog dlg(this, currentRepositoryName(), user, key, previousMessage);
Expand Down

0 comments on commit c17f735

Please sign in to comment.