History

remove `git-config` dependency

Sebastian Thiel committed 4 years ago

Commit cf63d871 parent cbc9ba93 files · +3 −6Browse files

Unified · Split

3 files
  1. Cargo.lock +0 −1
  2. gitoxide-core/Cargo.toml +0 −1
  3. gitoxide-core/src/organize.rs +3 −4
Cargo.lock+0−1
@@ -1834,7 +1834,6 @@ dependencies = [ · 1833 unmodified lines
18341834 "futures-io",
18351835 "futures-lite",
18361836 "git-commitgraph",
1837− "git-config",
18381837 "git-features",
18391838 "git-pack",
18401839 "git-repository",
gitoxide-core/Cargo.toml+0−1
@@ -40,7 +40,6 @@ git-repository = { version = "^0.24.0", path = "../git-repository", default-feat · 39 unmodified lines
4040 git-pack-for-configuration-only = { package = "git-pack", version = "^0.22.0", path = "../git-pack", default-features = false, features = ["pack-cache-lru-dynamic", "pack-cache-lru-static"] }
4141 git-transport-configuration-only = { package = "git-transport", version = "^0.20.0", path = "../git-transport", default-features = false }
4242 git-commitgraph = { version = "^0.8.2", path = "../git-commitgraph" }
43−git-config = { version = "^0.7.1", path = "../git-config" }
4443 git-features = { version = "^0.22.4", path = "../git-features" }
4544 serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] }
4645 anyhow = "1.0.42"
gitoxide-core/src/organize.rs+3−4
@@ -4,7 +4,6 @@ use std::{ · 3 unmodified lines
44 };
55
66 use git::{objs::bstr::ByteSlice, progress, Progress};
7−use git_config::File;
87 use git_repository as git;
98
109 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -101,9 +100,9 @@ where · 90 unmodified lines
101100
102101 fn find_origin_remote(repo: &Path) -> anyhow::Result<Option<git_url::Url>> {
103102 let non_bare = repo.join(".git").join("config");
104− let local = git_config::Source::Local;
105− let config = File::from_path_no_includes(non_bare.as_path(), local)
106− .or_else(|_| File::from_path_no_includes(repo.join("config").as_path(), local))?;
103+ let local = git::config::Source::Local;
104+ let config = git::config::File::from_path_no_includes(non_bare.as_path(), local)
105+ .or_else(|_| git::config::File::from_path_no_includes(repo.join("config").as_path(), local))?;
107106 Ok(config
108107 .string("remote", Some("origin"), "url")
109108 .map(|url| git_url::Url::from_bytes(url.as_ref()))