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
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ resolver = "2"
[workspace.package]
repository = "https://github.com/gitext-rs/git-stack.git"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.74" # MSRV
edition = "2024"
rust-version = "1.85" # MSRV
include = [
"build.rs",
"src/**/*",
Expand Down
6 changes: 2 additions & 4 deletions src/git/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,8 @@ impl GitRepo {
)?;

if let Some(op) = rebase.next() {
op.map_err(|e| {
op.inspect_err(|_e| {
let _ = rebase.abort();
e
})?;
let inmemory_index = rebase
.inmemory_index()
Expand All @@ -383,9 +382,8 @@ impl GitRepo {
.repo
.signature()
.unwrap_or_else(|e| panic!("Unexpected git2 error: {e}"));
let result = rebase.commit(None, &sig, None).map_err(|e| {
let result = rebase.commit(None, &sig, None).inspect_err(|_e| {
let _ = rebase.abort();
e
});
match result {
// Created commit, must be unique
Expand Down
6 changes: 5 additions & 1 deletion src/graph/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,11 @@ fn mark_push_status(graph: &mut Graph, branch_id: git2::Oid) -> Option<PushStatu
break;
}
Some(PushStatus::Pushed) | Some(PushStatus::Pushable) => {
log::debug!("Branches at {} aren't pushable, parent branch at {} should be pushed first", branch_id, parent_id);
log::debug!(
"Branches at {} aren't pushable, parent branch at {} should be pushed first",
branch_id,
parent_id
);
status = Some(PushStatus::Blocked("parent branch"));
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/git/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl Script {

pub fn is_branch_deleted(&self, branch: &str) -> bool {
for command in &self.commands {
if let Command::DeleteBranch(ref current) = command {
if let Command::DeleteBranch(current) = command {
if branch == current {
return true;
}
Expand Down
6 changes: 2 additions & 4 deletions src/legacy/git/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,8 @@ impl GitRepo {
)?;

if let Some(op) = rebase.next() {
op.map_err(|e| {
op.inspect_err(|_e| {
let _ = rebase.abort();
e
})?;
let inmemory_index = rebase
.inmemory_index()
Expand All @@ -410,9 +409,8 @@ impl GitRepo {
.repo
.signature()
.unwrap_or_else(|e| panic!("Unexpected git2 error: {e}"));
let result = rebase.commit(None, &sig, None).map_err(|e| {
let result = rebase.commit(None, &sig, None).inspect_err(|_e| {
let _ = rebase.abort();
e
});
match result {
// Created commit, must be unique
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ pub use actions::*;
pub use node::*;
pub use ops::*;

use std::collections::btree_map::Entry;
use std::collections::BTreeMap;
use std::collections::VecDeque;
use std::collections::btree_map::Entry;

#[derive(Clone, Debug)]
pub struct Graph {
Expand Down
Loading