Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ pub struct StyleConfig {
pub branch: StyleConfigEntry,
pub remote: StyleConfigEntry,
pub tag: StyleConfigEntry,
pub author: StyleConfigEntry,
}

#[derive(Default, Debug, Deserialize)]
Expand Down
1 change: 1 addition & 0 deletions src/default_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ hash = { fg = "yellow" }
branch = { fg = "green" }
remote = { fg = "red" }
tag = { fg = "yellow" }
author = { fg = "magenta" }

[bindings]
root.quit = ["q", "esc"]
Expand Down
1 change: 1 addition & 0 deletions src/item_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub(crate) enum ItemData {
short_id: String,
associated_references: Vec<RefKind>,
summary: String,
author: String,
},
Untracked(PathBuf),
Delta {
Expand Down
3 changes: 3 additions & 0 deletions src/items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ impl Item {
short_id,
associated_references,
summary,
author,
..
} => Line::from_iter(itertools::intersperse(
iter::once(Span::styled(short_id, &config.style.hash))
Expand All @@ -74,6 +75,7 @@ impl Item {
}
}),
)
.chain([Span::styled(author, &config.style.author)])
.chain([Span::raw(summary)]),
Span::raw(" "),
)),
Expand Down Expand Up @@ -360,6 +362,7 @@ pub(crate) fn log(
short_id,
associated_references,
summary: commit.summary().unwrap_or("").to_string(),
author: commit.author().name().unwrap_or("").to_string(),
};

Ok(Some(Item {
Expand Down
4 changes: 2 additions & 2 deletions src/tests/snapshots/gitu__tests__binary_file.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ expression: ctx.redact_buffer()
▌added binary-file |
|
Recent commits |
b66a0bf main origin/main add initial-file |
b66a0bf main origin/main Author Name add initial-file |
|
|
|
Expand All @@ -22,4 +22,4 @@ expression: ctx.redact_buffer()
|
|
|
styles_hash: 2ac73f967fc59190
styles_hash: 1a311c571aeba00f
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: ctx.redact_buffer()
▌On branch new |
|
Recent commits |
b66a0bf main merged new origin/main add initial-file |
b66a0bf main merged new origin/main Author Name add initial-file |
|
|
|
Expand All @@ -22,4 +22,4 @@ expression: ctx.redact_buffer()
────────────────────────────────────────────────────────────────────────────────|
$ git checkout -b new |
Switched to a new branch 'new' |
styles_hash: 2afc72138214b087
styles_hash: 33118d77bd00d80d
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: ctx.redact_buffer()
▌Your branch is up to date with 'origin/main'. |
|
Recent commits |
b66a0bf main merged origin/main add initial-file |
b66a0bf main merged origin/main Author Name add initial-file |
|
|
|
Expand All @@ -22,4 +22,4 @@ expression: ctx.redact_buffer()
|
────────────────────────────────────────────────────────────────────────────────|
! Branch name required |
styles_hash: e1391c67392b2270
styles_hash: 66d6b6ad0f3d56ac
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: ctx.redact_buffer()
▌Your branch is up to date with 'origin/main'. |
|
Recent commits |
b66a0bf main origin/main add initial-file |
b66a0bf main origin/main Author Name add initial-file |
|
|
|
Expand All @@ -22,4 +22,4 @@ expression: ctx.redact_buffer()
────────────────────────────────────────────────────────────────────────────────|
$ git branch -d merged |
Deleted branch merged (was b66a0bf). |
styles_hash: dce6312dfc6aa477
styles_hash: 9042510a86ca21ea
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: ctx.redact_buffer()
▌Your branch is up to date with 'origin/main'. |
|
Recent commits |
b66a0bf main merged origin/main add initial-file |
b66a0bf main merged origin/main Author Name add initial-file |
|
|
|
Expand All @@ -22,4 +22,4 @@ expression: ctx.redact_buffer()
────────────────────────────────────────────────────────────────────────────────|
$ git branch -d -f unmerged |
Deleted branch unmerged (was c84f226). |
styles_hash: 50fae40f3cb39dd3
styles_hash: 29109c15a5c71f2a
4 changes: 2 additions & 2 deletions src/tests/snapshots/gitu__tests__branch__spinoff_branch.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: ctx.redact_buffer()
▌On branch new |
|
Recent commits |
b66a0bf main merged new origin/main add initial-file |
b66a0bf main merged new origin/main Author Name add initial-file |
|
|
|
Expand All @@ -22,4 +22,4 @@ expression: ctx.redact_buffer()
$ git checkout -b new |
Switched to a new branch 'new' |
> Branch main not changed |
styles_hash: f6b1f1b8641cb19a
styles_hash: d4814d5edbc79f61
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ expression: ctx.redact_buffer()
▌On branch new |
|
Recent commits |
c84f226 new add first commit |
b66a0bf main origin/main add initial-file |
c84f226 new Author Name add first commit |
b66a0bf main origin/main Author Name add initial-file |
|
|
|
Expand All @@ -22,4 +22,4 @@ $ git checkout -b new
Switched to a new branch 'new' |
$ git update-ref -m "reset: moving to b66a0bf82020d6a386e94d0fceedec1f817d20c7" |
> Branch main was reset to b66a0bf82020d6a386e94d0fceedec1f817d20c7 |
styles_hash: 3b16474e21a1768a
styles_hash: 139b14b7feac0bfc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: ctx.redact_buffer()
▌Your branch is up to date with 'origin/main'. |
|
Recent commits |
b66a0bf main merged origin/main add initial-file |
b66a0bf main merged origin/main Author Name add initial-file |
|
|
|
Expand All @@ -22,4 +22,4 @@ expression: ctx.redact_buffer()
|
────────────────────────────────────────────────────────────────────────────────|
! Cannot spin-off unmerged. It already exists |
styles_hash: bde5e651489b5245
styles_hash: d2fea42ee57930ea
6 changes: 3 additions & 3 deletions src/tests/snapshots/gitu__tests__chmod_file.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ expression: ctx.redact_buffer()
modified test-file… |
|
Recent commits |
d95f7af main add test-file |
b66a0bf origin/main add initial-file |
d95f7af main Author Name add test-file |
b66a0bf origin/main Author Name add initial-file |
|
|
|
Expand All @@ -22,4 +22,4 @@ expression: ctx.redact_buffer()
|
|
|
styles_hash: 1e469a2968dd9d14
styles_hash: f037e8b96a744497
4 changes: 2 additions & 2 deletions src/tests/snapshots/gitu__tests__commit__commit_extend.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: ctx.redact_buffer()
▌Your branch and 'origin/main' have diverged,and have 1 and 1 different commits…|
|
Recent commits |
5dfe782 main add initial-file |
5dfe782 main Author Name add initial-file |
|
|
|
Expand All @@ -22,4 +22,4 @@ expression: ctx.redact_buffer()
|
────────────────────────────────────────────────────────────────────────────────|
$ git commit --amend --no-edit |
styles_hash: 33ce7d91041bde51
styles_hash: 29cb78853023d7a4
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ expression: ctx.redact_buffer()
Your branch is ahead of 'origin/main' by 2 commit(s). |
|
Recent commits |
2809bd7 main modify instant_fixup.txt |
fa09c62 add instant_fixup.txt |
▌b66a0bf origin/main add initial-file |
2809bd7 main Author Name modify instant_fixup.txt |
fa09c62 Author Name add instant_fixup.txt |
▌b66a0bf origin/main Author Name add initial-file |
|
|
|
Expand All @@ -22,4 +22,4 @@ $ git commit --fixup efc77f3bea683ce4ea27f2e9d7d1bdf04c91a57f
Author: Author Name <author@email.com> |
1 file changed, 1 insertion(+), 1 deletion(-) |
$ git rebase -i -q --autostash --keep-empty --autosquash efc77f3bea683ce4ea27f2e|
styles_hash: 6969ae121e8e1f63
styles_hash: ad13416608c50ff8
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ expression: ctx.redact_buffer()
+unstaged |
|
Recent commits |
bada738 main empty commit |
2809bd7 modify instant_fixup.txt |
fa09c62 add instant_fixup.txt |
▌b66a0bf origin/main add initial-file |
bada738 main Author Name empty commit |
2809bd7 Author Name modify instant_fixup.txt |
fa09c62 Author Name add instant_fixup.txt |
▌b66a0bf origin/main Author Name add initial-file |
────────────────────────────────────────────────────────────────────────────────|
$ git commit --fixup efc77f3bea683ce4ea27f2e9d7d1bdf04c91a57f |
[main bec1be7] fixup! modify instant_fixup.txt |
Expand All @@ -22,4 +22,4 @@ $ git commit --fixup efc77f3bea683ce4ea27f2e9d7d1bdf04c91a57f
$ git rebase -i -q --autostash --keep-empty --autosquash efc77f3bea683ce4ea27f2e|
Applied autostash. |
Created autostash: d682ced |
styles_hash: 22852fd934c64bf
styles_hash: f59845009e9ead1f
4 changes: 2 additions & 2 deletions src/tests/snapshots/gitu__tests__commit__commit_menu.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ expression: ctx.redact_buffer()
added new_file.txt… |
|
Recent commits |
b66a0bf main origin/main add initial-file |
b66a0bf main origin/main Author Name add initial-file |
|
|
|
Expand All @@ -22,4 +22,4 @@ expression: ctx.redact_buffer()
q/esc Quit/Close -R Claim authorship and reset author date (--reset-author) |
-s Add Signed-off-by line (--signoff) |
-v Show diff of changes to be committed (--verbose) |
styles_hash: 76a5f2a964e77056
styles_hash: e7a0dd34947e4e24
6 changes: 3 additions & 3 deletions src/tests/snapshots/gitu__tests__copied_file.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ expression: ctx.redact_buffer()
added copied-file… |
|
Recent commits |
b00a756 main add new-file |
b66a0bf origin/main add initial-file |
b00a756 main Author Name add new-file |
b66a0bf origin/main Author Name add initial-file |
|
|
|
Expand All @@ -22,4 +22,4 @@ expression: ctx.redact_buffer()
|
|
|
styles_hash: 2bb10d15c578771b
styles_hash: 3611ae755e157328
6 changes: 3 additions & 3 deletions src/tests/snapshots/gitu__tests__crlf_diff.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ expression: ctx.redact_buffer()
+changed |
|
Recent commits |
13d662a main add crlf.txt |
b66a0bf origin/main add initial-file |
13d662a main Author Name add crlf.txt |
b66a0bf origin/main Author Name add initial-file |
|
|
|
|
|
|
|
styles_hash: b0d01159a2674933
styles_hash: 44db695b405ae7f5
Loading