Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Commit 3de5557

Browse files
authored
If there's no new recognized language, don't update (#608)
1 parent 8527aa2 commit 3de5557

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

server/bleep/src/repo.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,11 @@ impl Repository {
280280
pub(crate) fn sync_done_with(&mut self, metadata: Arc<RepoMetadata>) {
281281
self.last_index_unix_secs = get_unix_time(SystemTime::now());
282282
self.last_commit_unix_secs = metadata.last_commit_unix_secs;
283-
self.most_common_lang = metadata.langs.most_common_lang().map(|l| l.to_string());
283+
self.most_common_lang = metadata
284+
.langs
285+
.most_common_lang()
286+
.map(|l| l.to_string())
287+
.or_else(|| self.most_common_lang.take());
284288
self.sync_status = SyncStatus::Done;
285289
}
286290

0 commit comments

Comments
 (0)