forked from qt-creator/qt-creator
Git: Filter out tags on command execution
For a repo with ~50K tags, this reduces the time of for-each-ref from ~1s to ~270ms. Change-Id: I00f735bba62307cc9419619ebe5aa71a800368ea Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
cd8ea1f45b
commit
8cd11e93e0
@@ -409,8 +409,12 @@ bool BranchModel::refresh(const FilePath &workingDirectory, QString *errorMessag
|
|||||||
}
|
}
|
||||||
|
|
||||||
d->currentSha = d->client->synchronousTopRevision(workingDirectory, &d->currentDateTime);
|
d->currentSha = d->client->synchronousTopRevision(workingDirectory, &d->currentDateTime);
|
||||||
const QStringList args = {"--format=%(objectname)\t%(refname)\t%(upstream:short)\t"
|
QStringList args = {"--format=%(objectname)\t%(refname)\t%(upstream:short)\t"
|
||||||
"%(*objectname)\t%(committerdate:raw)\t%(*committerdate:raw)"};
|
"%(*objectname)\t%(committerdate:raw)\t%(*committerdate:raw)",
|
||||||
|
"refs/heads/**",
|
||||||
|
"refs/remotes/**"};
|
||||||
|
if (d->client->settings().showTags.value())
|
||||||
|
args << "refs/tags/**";
|
||||||
QString output;
|
QString output;
|
||||||
if (!d->client->synchronousForEachRefCmd(workingDirectory, args, &output, errorMessage)) {
|
if (!d->client->synchronousForEachRefCmd(workingDirectory, args, &output, errorMessage)) {
|
||||||
endResetModel();
|
endResetModel();
|
||||||
|
|||||||
Reference in New Issue
Block a user