Skip to content

Commit

Permalink
During cloning by default all submodules init parallel using all CPU …
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanAizek committed Aug 11, 2024
1 parent 67080a4 commit 84c8fcc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Git.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <QThread>
#include <QTimer>
#include <optional>
#include <thread>

Git::CommitID::CommitID()
{
Expand Down Expand Up @@ -1042,8 +1043,8 @@ bool Git::clone(CloneData const &data, AbstractPtyProcess *pty)
QDir cwd = QDir::current();

auto DoIt = [&](){
QString cmd = "clone --progress \"%1\" \"%2\"";
cmd = cmd.arg(data.url).arg(data.subdir);
QString cmd = "clone --recurse-submodules --progress -j%1 \"%2\" \"%3\"";
cmd = cmd.arg(std::thread::hardware_concurrency()).arg(data.url).arg(data.subdir);
ok = git_nochdir(cmd, pty);
};

Expand Down

0 comments on commit 84c8fcc

Please sign in to comment.