summaryrefslogtreecommitdiff
path: root/helix-vcs/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-vcs/src')
-rw-r--r--helix-vcs/src/git.rs21
1 files changed, 10 insertions, 11 deletions
diff --git a/helix-vcs/src/git.rs b/helix-vcs/src/git.rs
index 432159b6..2a540c8d 100644
--- a/helix-vcs/src/git.rs
+++ b/helix-vcs/src/git.rs
@@ -1,9 +1,8 @@
use std::path::Path;
-use git::objs::tree::EntryMode;
-use git::sec::trust::DefaultForLevel;
-use git::{Commit, ObjectId, Repository, ThreadSafeRepository};
-use git_repository as git;
+use gix::objs::tree::EntryMode;
+use gix::sec::trust::DefaultForLevel;
+use gix::{Commit, ObjectId, Repository, ThreadSafeRepository};
use crate::DiffProvider;
@@ -15,13 +14,13 @@ pub struct Git;
impl Git {
fn open_repo(path: &Path, ceiling_dir: Option<&Path>) -> Option<ThreadSafeRepository> {
// custom open options
- let mut git_open_opts_map = git::sec::trust::Mapping::<git::open::Options>::default();
+ let mut git_open_opts_map = gix::sec::trust::Mapping::<gix::open::Options>::default();
// On windows various configuration options are bundled as part of the installations
// This path depends on the install location of git and therefore requires some overhead to lookup
// This is basically only used on windows and has some overhead hence it's disabled on other platforms.
// `gitoxide` doesn't use this as default
- let config = git::permissions::Config {
+ let config = gix::permissions::Config {
system: true,
git: true,
user: true,
@@ -30,16 +29,16 @@ impl Git {
git_binary: cfg!(windows),
};
// change options for config permissions without touching anything else
- git_open_opts_map.reduced = git_open_opts_map.reduced.permissions(git::Permissions {
+ git_open_opts_map.reduced = git_open_opts_map.reduced.permissions(gix::Permissions {
config,
- ..git::Permissions::default_for_level(git::sec::Trust::Reduced)
+ ..gix::Permissions::default_for_level(gix::sec::Trust::Reduced)
});
- git_open_opts_map.full = git_open_opts_map.full.permissions(git::Permissions {
+ git_open_opts_map.full = git_open_opts_map.full.permissions(gix::Permissions {
config,
- ..git::Permissions::default_for_level(git::sec::Trust::Full)
+ ..gix::Permissions::default_for_level(gix::sec::Trust::Full)
});
- let mut open_options = git::discover::upwards::Options::default();
+ let mut open_options = gix::discover::upwards::Options::default();
if let Some(ceiling_dir) = ceiling_dir {
open_options.ceiling_dirs = vec![ceiling_dir.to_owned()];
}