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
gitmux in a repository with no commits (git init with 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
Describe the bug
When a repository has no commits yet (
IsInitial: true), thelayoutconfiguration is completely ignored. The output format is hardcoded informater.go:This means any custom layout (leading/trailing strings, component ordering, etc.) has no effect on repos in this state.
To Reproduce
gitmuxin a repository with no commits (git initwith nothing committed).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:
0.11.5