Skip to content
Merged
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
2 changes: 1 addition & 1 deletion crates/but/src/command/legacy/diff/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl DiffDisplay for HunkAssignment {
// ────────╯
output.push_str(&format!("{}╮\n", "─".repeat(content_width).dimmed()));
if let Some(id) = &short_id {
output.push_str(&format!("{} {}│\n", id.blue().underline(), self.path.bold()));
output.push_str(&format!("{} {}│\n", id.blue().bold(), self.path.bold()));
} else {
output.push_str(&format!("{}│\n", self.path.bold()));
}
Expand Down
8 changes: 4 additions & 4 deletions crates/but/src/command/legacy/oplog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub(crate) fn show_oplog(

let commit_id = format!(
"{}{}",
&snapshot.commit_id.to_string()[..7].blue().underline(),
&snapshot.commit_id.to_string()[..7].blue().bold(),
&snapshot.commit_id.to_string()[7..12].blue().dimmed()
);

Expand Down Expand Up @@ -189,7 +189,7 @@ pub(crate) fn restore_to_oplog(
use std::fmt::Write;
writeln!(out, "{}", "Restoring to oplog snapshot...".blue().bold())?;
writeln!(out, " Target: {} ({})", target_operation.green(), target_time.dimmed())?;
writeln!(out, " Snapshot: {}", commit_sha_string[..7].cyan().underline())?;
writeln!(out, " Snapshot: {}", commit_sha_string[..7].cyan().bold())?;

// Confirm the restoration (safety check)
if !force {
Expand Down Expand Up @@ -259,7 +259,7 @@ pub(crate) fn undo_last_operation(ctx: &mut but_ctx::Context, out: &mut OutputCh
if let Some(out) = out.for_human() {
let restore_commit_short = format!(
"{}{}",
&target_snapshot.commit_id.to_string()[..7].blue().underline(),
&target_snapshot.commit_id.to_string()[..7].blue().bold(),
&target_snapshot.commit_id.to_string()[7..12].blue().dimmed()
);

Expand Down Expand Up @@ -297,7 +297,7 @@ pub(crate) fn create_snapshot(
writeln!(
out,
" Snapshot ID: {}{}",
snapshot_id.to_string()[..7].blue().underline(),
snapshot_id.to_string()[..7].blue().bold(),
snapshot_id.to_string()[7..12].blue().dimmed()
)?;

Expand Down
4 changes: 2 additions & 2 deletions crates/but/src/command/legacy/rub/amend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub(crate) fn uncommitted_to_commit(
.new_commit
.map(|c| {
let s = c.to_string();
format!("{}{}", s[..2].blue().underline(), s[2..7].blue())
format!("{}{}", s[..2].blue().bold(), s[2..7].blue())
})
.unwrap_or_default();
writeln!(out, "Amended {description} → {new_commit}")?;
Expand Down Expand Up @@ -64,7 +64,7 @@ pub(crate) fn assignments_to_commit(
.new_commit
.map(|c| {
let s = c.to_string();
format!("{}{}", s[..2].blue().underline(), s[2..7].blue())
format!("{}{}", s[..2].blue().bold(), s[2..7].blue())
})
.unwrap_or_default();
if let Some(branch_name) = branch_name {
Expand Down
20 changes: 10 additions & 10 deletions crates/but/src/command/legacy/rub/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ pub(crate) fn handle(
fn makes_no_sense_error(source: &CliId, target: &CliId) -> String {
format!(
"Operation doesn't make sense. Source {} is {} and target {} is {}.",
source.to_short_string().blue().underline(),
source.to_short_string().blue().bold(),
source.kind_for_humans().yellow(),
target.to_short_string().blue().underline(),
target.to_short_string().blue().bold(),
target.kind_for_humans().yellow()
)
}
Expand Down Expand Up @@ -730,7 +730,7 @@ pub(crate) fn handle_uncommit(ctx: &mut Context, out: &mut OutputChannel, source
_ => {
bail!(
"Cannot uncommit {} - it is {}. Only commits and files-in-commits can be uncommitted.",
source_str.blue().underline(),
source_str.blue().bold(),
source.kind_for_humans().yellow()
);
}
Expand Down Expand Up @@ -762,7 +762,7 @@ pub(crate) fn handle_amend(
_ => {
bail!(
"Cannot amend {} - it is {}. Only uncommitted files and hunks can be amended.",
file.to_short_string().blue().underline(),
file.to_short_string().blue().bold(),
file.kind_for_humans().yellow()
);
}
Expand All @@ -777,7 +777,7 @@ pub(crate) fn handle_amend(
other => {
bail!(
"Cannot amend into {} - it is {}. Target must be a commit.",
other.to_short_string().blue().underline(),
other.to_short_string().blue().bold(),
other.kind_for_humans().yellow()
);
}
Expand Down Expand Up @@ -808,7 +808,7 @@ pub(crate) fn handle_stage(
_ => {
bail!(
"Cannot stage {} - it is {}. Only uncommitted files and hunks can be staged.",
file.to_short_string().blue().underline(),
file.to_short_string().blue().bold(),
file.kind_for_humans().yellow()
);
}
Expand All @@ -823,7 +823,7 @@ pub(crate) fn handle_stage(
other => {
bail!(
"Cannot stage to {} - it is {}. Target must be a branch.",
other.to_short_string().blue().underline(),
other.to_short_string().blue().bold(),
other.kind_for_humans().yellow()
);
}
Expand Down Expand Up @@ -852,7 +852,7 @@ pub(crate) fn handle_stage_tui(
other => {
bail!(
"Cannot stage to {} - it is {}. Target must be a branch.",
other.to_short_string().blue().underline(),
other.to_short_string().blue().bold(),
other.kind_for_humans().yellow()
);
}
Expand Down Expand Up @@ -950,7 +950,7 @@ pub(crate) fn handle_unstage(
_ => {
bail!(
"Cannot unstage {} - it is {}. Only uncommitted files and hunks can be unstaged.",
file.to_short_string().blue().underline(),
file.to_short_string().blue().bold(),
file.kind_for_humans().yellow()
);
}
Expand All @@ -967,7 +967,7 @@ pub(crate) fn handle_unstage(
other => {
bail!(
"Cannot unstage from {} - it is {}. Target must be a branch.",
other.to_short_string().blue().underline(),
other.to_short_string().blue().bold(),
other.kind_for_humans().yellow()
);
}
Expand Down
4 changes: 2 additions & 2 deletions crates/but/src/command/legacy/rub/move.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ pub(crate) fn handle(
bail!(
"Cannot move {} ({}) to {} ({}).\n\
Valid moves: commit→commit, commit→branch, or committed-file→commit",
source_id.to_short_string().blue().underline(),
source_id.to_short_string().blue().bold(),
source_id.kind_for_humans().yellow(),
target_id.to_short_string().blue().underline(),
target_id.to_short_string().blue().bold(),
target_id.kind_for_humans().yellow()
);
};
Expand Down
2 changes: 1 addition & 1 deletion crates/but/src/command/legacy/rub/squash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ fn handle_multi_commit_squash(
other => {
bail!(
"Cannot squash {} - it is {}. All arguments must be commits.",
other.to_short_string().blue().underline(),
other.to_short_string().blue().bold(),
other.kind_for_humans().yellow()
);
}
Expand Down
14 changes: 7 additions & 7 deletions crates/but/src/command/legacy/status/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ fn print_assignments(

let id = stack
.and_then(|s| id_map.resolve_stack(s))
.map(|s| s.to_short_string().underline().blue())
.map(|s| s.to_short_string().bold().blue())
.unwrap_or_default();

if !unstaged && !assignments.is_empty() {
Expand Down Expand Up @@ -497,7 +497,7 @@ fn print_assignments(

let cli_id = &fa.assignments[0].cli_id;
let pad = max_id_width.saturating_sub(cli_id.len());
let id = format!("{:pad$}{}", "", cli_id.underline().blue());
let id = format!("{:pad$}{}", "", cli_id.bold().blue());

let mut locks = fa
.assignments
Expand All @@ -507,7 +507,7 @@ fn print_assignments(
.map(|l| l.commit_id.to_string())
.collect::<std::collections::BTreeSet<_>>()
.into_iter()
.map(|commit_id| format!("{}{}", commit_id[..2].blue().underline(), commit_id[2..7].blue()))
.map(|commit_id| format!("{}{}", commit_id[..2].blue().bold(), commit_id[2..7].blue()))
.collect::<Vec<_>>()
.join(", ");

Expand Down Expand Up @@ -548,7 +548,7 @@ pub fn print_group(
if let Some(stack_with_id) = stack_with_id {
let mut first = true;
for segment in &stack_with_id.segments {
let id = segment.short_id.underline().blue();
let id = segment.short_id.bold().blue();
let notch = if first { "╭" } else { "├" };
if !first {
writeln!(out, "┊│")?;
Expand Down Expand Up @@ -677,7 +677,7 @@ pub fn print_group(
}
}
} else {
let id = id_map.unassigned().to_short_string().underline().blue();
let id = id_map.unassigned().to_short_string().bold().blue();
writeln!(
out,
"╭┄{} [{}] {}",
Expand Down Expand Up @@ -823,7 +823,7 @@ fn print_commit(
match commit_changes {
CommitChanges::Workspace(tree_changes) => {
for TreeChangeWithId { short_id, inner } in tree_changes {
let cid = short_id.blue().underline();
let cid = short_id.blue().bold();
writeln!(out, "┊│ {cid} {}", inner.display_cli(false))?;
}
}
Expand Down Expand Up @@ -861,7 +861,7 @@ fn display_cli_commit_details(
let commit_id = commit.id.to_string();
commit_id[short_id.len()..7].dimmed().to_string()
};
let start_id = short_id.blue().underline();
let start_id = short_id.blue().bold();

let conflicted_str = if commit.has_conflicts {
" {conflicted}".red()
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading