Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Refactor: `UpstreamStatus::active` reports remote presence

Maximilian Roos08f03be204d2
diff --git a/src/commands/list/model.rs b/src/commands/list/model.rs
index ad228447c..47f7dbb3e 100644
--- a/src/commands/list/model.rs
+++ b/src/commands/list/model.rs
@@ -117,15 +117,9 @@ impl UpstreamStatus {
}
pub fn active(&self) -> Option<(&str, usize, usize)> {
- if self.ahead == 0 && self.behind == 0 {
- None
- } else {
- Some((
- self.remote.as_deref().unwrap_or("origin"),
- self.ahead,
- self.behind,
- ))
- }
+ self.remote
+ .as_deref()
+ .map(|remote| (remote, self.ahead, self.behind))
}
#[cfg(test)]