Skip to content

Commit

Permalink
fix(revisions): special case root revision rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
idursun committed Mar 3, 2025
1 parent 0a7fe75 commit 045d649
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/ui/common/graph_row_renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ func (s SegmentedRenderer) RenderChangeId(commit *jj.Commit) string {
}

func (s SegmentedRenderer) RenderCommitId(commit *jj.Commit) string {
if commit.IsRoot() {
return ""
}
return s.Palette.CommitShortStyle.Render(commit.CommitIdShort) + s.Palette.CommitIdRestStyle.Render(commit.CommitId[len(commit.ChangeIdShort):])
}

Expand All @@ -65,6 +68,9 @@ func (s SegmentedRenderer) RenderAuthor(commit *jj.Commit) string {
}

func (s SegmentedRenderer) RenderDate(commit *jj.Commit) string {
if commit.IsRoot() {
return ""
}
return s.Palette.TimestampStyle.Render(commit.Timestamp)
}

Expand Down

0 comments on commit 045d649

Please sign in to comment.