Skip to main content

preview_list

Function preview_list 

Source
pub fn preview_list(items: &[String], total: usize) -> String
Expand description

Format a truncated one-line preview of an ordered string list for inclusion in a status / advice / blocker message. Used by every verb that would otherwise dump a 50+ item csv onto a single line: branch lists in status/log/show/doctor, heavy-impact path lists in status/snapshot/thread/merge, and the Heavy-impact change: blocker built in repo::thread_advice.

Keeps the first three names and tags the rest as … +N more. The full list still lives in every JSON form (--output json plus the verb-specific structured surfaces).