huskies: merge 1042
This commit is contained in:
@@ -5,9 +5,6 @@ use crate::config::ProjectConfig;
|
||||
use crate::pipeline_state::{ArchiveReason, PipelineItem, Stage};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
/// Maximum number of dirty file paths shown inline per story before truncating.
|
||||
const MAX_DIRTY_FILES_SHOWN: usize = 20;
|
||||
|
||||
/// Map a stage to its display section label, or `None` to skip it entirely.
|
||||
///
|
||||
/// This is the single source of truth for the "where does this item appear"
|
||||
@@ -218,9 +215,10 @@ pub(crate) fn build_status_from_items(
|
||||
out
|
||||
}
|
||||
|
||||
/// Render working tree summary lines for a story with uncommitted changes.
|
||||
/// Render the one-line working tree summary for a story with uncommitted changes.
|
||||
///
|
||||
/// Returns an empty string when the working tree is clean.
|
||||
/// Returns an empty string when the working tree is clean. File paths are not
|
||||
/// listed here; use `status N` (triage) for the per-file breakdown.
|
||||
fn render_working_tree_lines(info: &crate::service::git_ops::DirtyFiles) -> String {
|
||||
if info.is_clean() {
|
||||
return String::new();
|
||||
@@ -230,16 +228,7 @@ fn render_working_tree_lines(info: &crate::service::git_ops::DirtyFiles) -> Stri
|
||||
(0, n) => format!("{n} new"),
|
||||
(m, n) => format!("{m} modified, {n} new"),
|
||||
};
|
||||
let mut out = format!(" Working tree: {summary} (uncommitted)\n");
|
||||
let shown = info.paths.len().min(MAX_DIRTY_FILES_SHOWN);
|
||||
for path in &info.paths[..shown] {
|
||||
out.push_str(&format!(" {path}\n"));
|
||||
}
|
||||
if info.paths.len() > MAX_DIRTY_FILES_SHOWN {
|
||||
let remaining = info.paths.len() - MAX_DIRTY_FILES_SHOWN;
|
||||
out.push_str(&format!(" ...and {remaining} more\n"));
|
||||
}
|
||||
out
|
||||
format!(" Working tree: {summary} (uncommitted)\n")
|
||||
}
|
||||
|
||||
/// Shared lookup tables passed to [`render_item_line`] to keep the argument count manageable.
|
||||
|
||||
Reference in New Issue
Block a user