Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix external editor for cmd and bat on windows #1674

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
50 changes: 31 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ which = "4.4"
pprof = { version = "0.11", features = ["flamegraph"], optional = true }

[dev-dependencies]
asyncgit = { path = "asyncgit", features = ["test_utils"] }
pretty_assertions = "1.3"
serial_test = "2.0.0"
tempfile = "3.4"

[badges]
Expand Down
6 changes: 4 additions & 2 deletions asyncgit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ keywords = ["git"]
[dependencies]
crossbeam-channel = "0.5"
easy-cast = "0.5"
env_logger = "0.10"
git2 = "0.17"
log = "0.4"
# git2 = { path = "../../extern/git2-rs", features = ["vendored-openssl"]}
Expand All @@ -24,6 +25,7 @@ rayon-core = "1.11"
scopetime = { path = "../scopetime", version = "0.1" }
serde = { version = "1.0", features = ["derive"] }
shellexpand = "3.1"
tempfile = "3.4"
thiserror = "1.0"
unicode-truncate = "0.2.0"
url = "2.3"
Expand All @@ -32,10 +34,10 @@ url = "2.3"
env_logger = "0.10"
invalidstring = { path = "../invalidstring", version = "0.1" }
pretty_assertions = "1.3"
serial_test = "1.0"
tempfile = "3.4"
serial_test = "2.0"

[features]
default = ["trace-libgit"]
trace-libgit = []
vendor-openssl = ["openssl-sys"]
test_utils = []
2 changes: 1 addition & 1 deletion asyncgit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// #![deny(clippy::expect_used)]
//TODO: consider cleaning some up and allow specific places
#![allow(clippy::significant_drop_tightening)]

#![allow(clippy::multiple_crate_versions)]
pub mod asyncjob;
mod blame;
mod branches;
Expand Down
17 changes: 14 additions & 3 deletions asyncgit/src/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,19 @@ pub use utils::{

pub use git2::ResetType;

#[cfg(test)]
mod tests {
#[cfg(feature = "test_utils")]
/// test utilities - exported now
// see https://github.com/rust-lang/cargo/issues/8379
pub mod tests {
// these are now not under 'test' so they get clippied with 'all-features'
// we dont care about tests that panic
#![allow(clippy::unwrap_used, clippy::missing_panics_doc)]
// minor niggles
#![allow(clippy::nursery)]
// this clippy is confused by the name 'read'
// should probably be changed to read_into
#![allow(clippy::read_zero_byte_vec)]

use super::{
commit,
repository::repo,
Expand Down Expand Up @@ -278,7 +289,7 @@ mod tests {

// init log
fn init_log() {
let _ = env_logger::builder()
let _b = env_logger::builder()
.is_test(true)
.filter_level(log::LevelFilter::Trace)
.try_init();
Expand Down
3 changes: 2 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ version = "1.0.3"
multiple-versions = "deny"
skip-tree = [
{ name = "windows-sys" },
{ name = "hermit-abi" }
{ name = "hermit-abi" },
{ name = "syn" }
]
Loading