Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit df33833

Browse files
author
Stephan Dilly
committed
2% optimisation in revlog where amend was still run on each event
1 parent b3b7f37 commit df33833

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- clearer help headers ([#131](https://github.com/extrawurst/gitui/issues/131))
1919
- diisplay non-utf8 commit messages at least partially ([#150](https://github.com/extrawurst/gitui/issues/150))
2020
- hooks ignored when running `gitui` in subfolder of workdir ([#151](https://github.com/extrawurst/gitui/issues/151))
21+
- some optimizations in reflog
2122

2223
## [0.7.0] - 2020年06月15日
2324

‎src/components/commit.rs‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,19 @@ impl Component for CommitComponent {
4444
) -> CommandBlocking {
4545
self.input.commands(out, force_all);
4646

47-
out.push(CommandInfo::new(
48-
commands::COMMIT_ENTER,
49-
self.can_commit(),
50-
self.is_visible() || force_all,
51-
));
52-
53-
out.push(CommandInfo::new(
54-
commands::COMMIT_AMEND,
55-
self.can_amend(),
56-
self.is_visible() || force_all,
57-
));
47+
if self.is_visible() || force_all {
48+
out.push(CommandInfo::new(
49+
commands::COMMIT_ENTER,
50+
self.can_commit(),
51+
true,
52+
));
53+
54+
out.push(CommandInfo::new(
55+
commands::COMMIT_AMEND,
56+
self.can_amend(),
57+
true,
58+
));
59+
}
5860

5961
visibility_blocking(self)
6062
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /