Skip to content

Commit c9e7c4a

Browse files
Giteatnyblom
Gitea
authored andcommitted
Don't warn about branches created at revision 1
1 parent cd3e93a commit c9e7c4a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/repository.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,11 @@ int FastImportRepository::Transaction::commit()
11211121
if (br.created && !br.marks.isEmpty() && br.marks.last()) {
11221122
parentmark = br.marks.last();
11231123
} else {
1124-
qWarning() << "WARN: Branch" << branch << "in repository" << repository->name << "doesn't exist at revision"
1125-
<< revnum << "-- did you resume from the wrong revision?";
1124+
if (revnum > 1) {
1125+
// Any branch at revision 1 isn't going to exist, so lets not alarm the user.
1126+
qWarning() << "WARN: Branch" << branch << "in repository" << repository->name << "doesn't exist at revision"
1127+
<< revnum << "-- did you resume from the wrong revision?";
1128+
}
11261129
br.created = revnum;
11271130
}
11281131
br.commits.append(revnum);

0 commit comments

Comments
 (0)