-
-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Describe the bug
When a repository has no commits yet (IsInitial: true), the layout configuration is completely ignored. The output format is hardcoded in formater.go:
if f.st.IsInitial {
branch := truncate(f.st.LocalBranch, f.Options.Ellipsis, f.Options.BranchMaxLen, f.Options.BranchTrim)
s := fmt.Sprintf("%s%s%s [no commits yet] %s", f.Styles.Clear, f.Styles.Branch, branch, f.flags())
_, err := io.WriteString(w, s)
return err
}This means any custom layout (leading/trailing strings, component ordering, etc.) has no effect on repos in this state.
To Reproduce
- Create a config with a custom layout, e.g.:
layout: [' ', flags, ' ', branch, ' ']
- Run
gitmuxin a repository with no commits (git initwith nothing committed). - The output ignores the layout and renders the hardcoded format instead.
Expected behavior
The layout config should be respected for initial repositories as well, or at minimum the hardcoded format should be consistent with the user's layout (e.g. preserving leading/trailing literal strings).
Environment:
- gitmux version:
0.11.5 - OS: Linux
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels