Skip to content

Commit cd3e93a

Browse files
Vampiretnyblom
authored andcommitted
Do not output "Removing annotated tag" on each deleted ref, but only if an annotated tag was present, otherwise it can be confusing that it says things like "Removing annotated tag "refs/heads/master" for "repository""
1 parent e7bf95a commit cd3e93a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/repository.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,8 +713,9 @@ void FastImportRepository::commit()
713713
continue;
714714
if (tagName.startsWith("refs/tags/"))
715715
tagName.remove(0, 10);
716-
qDebug() << "Removing annotated tag" << tagName << "for" << name;
717-
annotatedTags.remove(tagName);
716+
if (annotatedTags.remove(tagName) > 0) {
717+
qDebug() << "Removing annotated tag" << tagName << "for" << name;
718+
}
718719
}
719720
deletedBranchNames.clear();
720721
resetBranchNames.clear();

0 commit comments

Comments
 (0)