Skip to content

Commit

Permalink
Don't cut commit field on initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
robertgzr committed May 6, 2018
1 parent e7154f0 commit 24f0e05
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion porcelain.go
Expand Up @@ -130,7 +130,12 @@ func (pi *PorcInfo) Fmt() string {
return fmt.Sprintf("%s %s@%s %s %s %s",
branchGlyph,
branchFmt(pi.branch),
commitFmt(pi.commit[:7]),
func() string {
if pi.commit == "(initial)" {
return commitFmt(pi.commit)
}
return commitFmt(pi.commit[:7])
}(),
func() string {
var buf bytes.Buffer
if pi.ahead > 0 {
Expand Down

0 comments on commit 24f0e05

Please sign in to comment.