aboutsummaryrefslogtreecommitdiff
path: root/src/workspace.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-08-12 20:00:37 +0300
committerGitHub <noreply@github.com>2026-08-12 20:00:37 +0300
commitd46d9a22751ec21a6c39d1acf6b3f31a2b2eecd8 (patch)
tree72b74269296ebcc36e2ce46a3adc5c184d711b2a /src/workspace.rs
parentc82a5b069c3d0bc16da13347d63538c9b95bd444 (diff)
fix: preserve workspace labels for root repositories (#2727)
refs #2594
Diffstat (limited to 'src/workspace.rs')
-rw-r--r--src/workspace.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/workspace.rs b/src/workspace.rs
index 85377f23..0a719ab1 100644
--- a/src/workspace.rs
+++ b/src/workspace.rs
@@ -83,12 +83,19 @@ impl WorkspaceGitStatusSnapshot {
status_cache_key: PathBuf,
demand: GitStatusRefreshDemand,
) -> WorkspaceGitStatus {
+ let auto_label = self
+ .space
+ .as_ref()
+ .map(|space| {
+ self::git::automatic_workspace_label(&resolved_identity_cwd, &space.repo_root)
+ })
+ .unwrap_or_else(|| fallback_label_from_cwd(&resolved_identity_cwd));
WorkspaceGitStatus {
workspace_id,
resolved_identity_cwd,
status_cache_key,
demand,
- auto_label: self.auto_label,
+ auto_label,
branch: self.branch,
ahead_behind: self.ahead_behind,
space: self.space,