Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion crates/git_ui/src/blame_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ impl BlameRenderer for GitBlameRenderer {
.render(window, cx);

let short_commit_id = sha
.get(..8)
.get(..git::SHORT_SHA_LENGTH)
.map(|sha| sha.to_string().into())
.unwrap_or_else(|| sha.clone());
let local_offset = time::UtcOffset::current_local_offset().unwrap_or(time::UtcOffset::UTC);
Expand Down
2 changes: 1 addition & 1 deletion crates/git_ui/src/commit_tooltip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ impl Render for CommitTooltip {
let short_commit_id = self
.commit
.sha
.get(0..8)
.get(0..git::SHORT_SHA_LENGTH)
.map(|sha| sha.to_string().into())
.unwrap_or_else(|| self.commit.sha.clone());
let full_sha = self.commit.sha.to_string();
Expand Down
2 changes: 1 addition & 1 deletion crates/git_ui/src/commit_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ impl CommitView {
.or(first_worktree_id)
})
.context("project has no worktrees")?;
let short_sha = commit_sha.get(0..7).unwrap_or(&commit_sha);
let short_sha = commit_sha.get(0..git::SHORT_SHA_LENGTH).unwrap_or(&commit_sha);
let file_name = file
.path
.file_name()
Expand Down
Loading