Skip to content

Commit ac9b830

Browse files
authored
Remove double space between rebase todo and author columns (#4520)
- **PR Description** In the commits list of an interactive rebase, the gap between the rebase todo column and the author column was two instead of one. Remove the extra space to make this gap the same as for all other columns.
2 parents 3ff1be0 + 6402c83 commit ac9b830

File tree

5 files changed

+39
-39
lines changed

5 files changed

+39
-39
lines changed

pkg/gui/presentation/commits.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ func displayCommit(
387387

388388
actionString := ""
389389
if commit.Action != models.ActionNone {
390-
actionString = actionColorMap(commit.Action, commit.Status).Sprint(commit.Action.String()) + " "
390+
actionString = actionColorMap(commit.Action, commit.Status).Sprint(commit.Action.String())
391391
}
392392

393393
tagString := ""

pkg/gui/presentation/commits_test.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,11 @@ func TestGetCommitListDisplayStrings(t *testing.T) {
224224
cherryPickedCommitHashSet: set.New[string](),
225225
now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
226226
expected: formatExpected(`
227-
hash1 pick commit1
228-
hash2 pick commit2
229-
hash3 ◯ commit3
230-
hash4 ◯ commit4
231-
hash5 ◯ commit5
227+
hash1 pick commit1
228+
hash2 pick commit2
229+
hash3 ◯ commit3
230+
hash4 ◯ commit4
231+
hash5 ◯ commit5
232232
`),
233233
},
234234
{
@@ -247,10 +247,10 @@ func TestGetCommitListDisplayStrings(t *testing.T) {
247247
cherryPickedCommitHashSet: set.New[string](),
248248
now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
249249
expected: formatExpected(`
250-
hash2 pick commit2
251-
hash3 ◯ commit3
252-
hash4 ◯ commit4
253-
hash5 ◯ commit5
250+
hash2 pick commit2
251+
hash3 ◯ commit3
252+
hash4 ◯ commit4
253+
hash5 ◯ commit5
254254
`),
255255
},
256256
{
@@ -289,8 +289,8 @@ func TestGetCommitListDisplayStrings(t *testing.T) {
289289
cherryPickedCommitHashSet: set.New[string](),
290290
now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
291291
expected: formatExpected(`
292-
hash1 pick commit1
293-
hash2 pick commit2
292+
hash1 pick commit1
293+
hash2 pick commit2
294294
`),
295295
},
296296
{
@@ -328,8 +328,8 @@ func TestGetCommitListDisplayStrings(t *testing.T) {
328328
cherryPickedCommitHashSet: set.New[string](),
329329
now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
330330
expected: formatExpected(`
331-
hash1 pick commit1
332-
hash2 pick commit2
331+
hash1 pick commit1
332+
hash2 pick commit2
333333
`),
334334
},
335335
{

pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{
6060
Press(keys.Universal.Edit).
6161
Lines(
6262
Contains("--- Pending rebase todos ---"),
63-
Contains("pick CI two"),
63+
Contains("pick CI two"),
6464
Contains("--- Commits ---"),
65-
Contains(" CI one").IsSelected(),
66-
Contains(" CI base"),
65+
Contains(" CI one").IsSelected(),
66+
Contains(" CI base"),
6767
).
6868
Press(keys.Commits.PasteCommits).
6969
Tap(func() {
@@ -77,11 +77,11 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{
7777
}).
7878
Lines(
7979
Contains("--- Pending rebase todos ---"),
80-
Contains("pick CI two"),
80+
Contains("pick CI two"),
8181
Contains("--- Commits ---"),
82-
Contains(" CI three"),
83-
Contains(" CI one"),
84-
Contains(" CI base"),
82+
Contains(" CI three"),
83+
Contains(" CI one"),
84+
Contains(" CI base"),
8585
).
8686
Tap(func() {
8787
t.Common().ContinueRebase()

pkg/integration/tests/interactive_rebase/edit_range_select_down_to_merge_outside_rebase.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ var EditRangeSelectDownToMergeOutsideRebase = NewIntegrationTest(NewIntegrationT
2828
Press(keys.Universal.Edit).
2929
Lines(
3030
Contains("--- Pending rebase todos ---"),
31-
Contains("edit CI commit 02").IsSelected(),
32-
Contains("edit CI commit 01").IsSelected(),
31+
Contains("edit CI commit 02").IsSelected(),
32+
Contains("edit CI commit 01").IsSelected(),
3333
Contains("--- Commits ---").IsSelected(),
34-
Contains(" CI ⏣─╮ Merge branch 'second-change-branch' into first-change-branch").IsSelected(),
35-
Contains(" CI │ ◯ * second-change-branch unrelated change"),
36-
Contains(" CI │ ◯ second change"),
37-
Contains(" CI ◯ │ first change"),
38-
Contains(" CI ◯─╯ * original"),
39-
Contains(" CI ◯ three"),
40-
Contains(" CI ◯ two"),
41-
Contains(" CI ◯ one"),
34+
Contains(" CI ⏣─╮ Merge branch 'second-change-branch' into first-change-branch").IsSelected(),
35+
Contains(" CI │ ◯ * second-change-branch unrelated change"),
36+
Contains(" CI │ ◯ second change"),
37+
Contains(" CI ◯ │ first change"),
38+
Contains(" CI ◯─╯ * original"),
39+
Contains(" CI ◯ three"),
40+
Contains(" CI ◯ two"),
41+
Contains(" CI ◯ one"),
4242
)
4343
},
4444
})

pkg/integration/tests/interactive_rebase/edit_range_select_outside_rebase.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ var EditRangeSelectOutsideRebase = NewIntegrationTest(NewIntegrationTestArgs{
3838
Press(keys.Universal.Edit).
3939
Lines(
4040
Contains("--- Pending rebase todos ---"),
41-
Contains("merge CI Merge branch 'second-change-branch' into first-change-branch").IsSelected(),
42-
Contains("edit CI first change").IsSelected(),
43-
Contains("edit CI * second-change-branch unrelated change").IsSelected(),
44-
Contains("edit CI second change").IsSelected(),
45-
Contains("edit CI * original").IsSelected(),
41+
Contains("merge CI Merge branch 'second-change-branch' into first-change-branch").IsSelected(),
42+
Contains("edit CI first change").IsSelected(),
43+
Contains("edit CI * second-change-branch unrelated change").IsSelected(),
44+
Contains("edit CI second change").IsSelected(),
45+
Contains("edit CI * original").IsSelected(),
4646
Contains("--- Commits ---").IsSelected(),
47-
Contains(" CI ◯ three").IsSelected(),
48-
Contains(" CI ◯ two"),
49-
Contains(" CI ◯ one"),
47+
Contains(" CI ◯ three").IsSelected(),
48+
Contains(" CI ◯ two"),
49+
Contains(" CI ◯ one"),
5050
)
5151
},
5252
})

0 commit comments

Comments
 (0)