Skip to content
Closed
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
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,11 @@ fn run_with_repo(logger: &slog::Logger, config: &Config, repo: &git2::Repository
&head_tree,
&[&head_commit],
)?)?;
let commit_short_id = head_commit.as_object().short_id()?;
let commit_short_id = commit_short_id.as_str().expect("the commit short id is always a valid ascii string by definition (its a hex string)");
info!(logger, "committed";
"commit" => head_commit.id().to_string(),
"commit" => commit_short_id,
"fixup" => dest_commit_locator,
"header" => format!("+{},-{}", diff.insertions(), diff.deletions()),
);
} else {
Expand Down
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ fn main() {
}

let decorator = slog_term::TermDecorator::new().build();
let drain = slog_term::FullFormat::new(decorator).build().fuse();
let drain = slog_term::FullFormat::new(decorator)
// Don't write a timestamp, as requested in #126
// I am currently running git absorb myself, I know what time it is :)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no self-explanatory comments please. anyone who wants to know why we did this can blame it

.use_custom_timestamp(|_| Ok(()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clever, but leaves an extra space at the beginning of each output line

.build()
.fuse();
let drain = std::sync::Mutex::new(drain).fuse();

let drain = slog::LevelFilter::new(
Expand Down