Archived
Make the superproject selectable via the header
The header stands for the root repository: it is selected on startup, shows the root's own state word, and the detail pane shows its state like a submodule's (HEAD vs. upstream, changes, unpushed, leftover submodule clones as untracked repositories). Submodules are ignored in the root's changes; their rows show them. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -78,3 +78,14 @@ func TestHiddenIssuesCountLoadErrors(t *testing.T) {
|
||||
t.Errorf("got %+v; want 1 danger", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRootIssueWording(t *testing.T) {
|
||||
st := &Status{Root: true}
|
||||
got := st.Issues()
|
||||
if len(got) != 1 || got[0].Kind != IssueUnpushed || got[0].Level != LevelDanger || got[0].Detail != "HEAD not pushed to any remote" {
|
||||
t.Errorf("Issues() = %+v", got)
|
||||
}
|
||||
if !(&Submodule{}).IsRoot() || (&Submodule{Path: "a"}).IsRoot() {
|
||||
t.Error("IsRoot should be true exactly for the empty path")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user