Skip to content

Commit 0737d97

Browse files
committed
adjust to changes in gix
1 parent 9689a08 commit 0737d97

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

gitoxide-core/src/organize.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ fn find_git_repository_workdirs(
1717
mut progress: impl Progress,
1818
debug: bool,
1919
threads: Option<usize>,
20-
) -> impl Iterator<Item = (PathBuf, gix::Kind)> {
20+
) -> impl Iterator<Item = (PathBuf, gix::repository::Kind)> {
2121
progress.init(None, progress::count("filesystem items"));
22-
fn is_repository(path: &Path) -> Option<gix::Kind> {
22+
fn is_repository(path: &Path) -> Option<gix::repository::Kind> {
2323
// Can be git dir or worktree checkout (file)
2424
if path.file_name() != Some(OsStr::new(".git")) && path.extension() != Some(OsStr::new("git")) {
2525
return None;
@@ -33,7 +33,7 @@ fn find_git_repository_workdirs(
3333
}
3434
} else {
3535
// git files are always worktrees
36-
Some(gix::Kind::WorkTree { is_linked: true })
36+
Some(gix::repository::Kind::WorkTree { is_linked: true })
3737
}
3838
}
3939
fn into_workdir(git_dir: PathBuf) -> PathBuf {
@@ -46,7 +46,7 @@ fn find_git_repository_workdirs(
4646

4747
#[derive(Debug, Default)]
4848
struct State {
49-
kind: Option<gix::Kind>,
49+
kind: Option<gix::repository::Kind>,
5050
}
5151

5252
let walk = jwalk::WalkDirGeneric::<((), State)>::new(root)
@@ -97,12 +97,12 @@ fn find_origin_remote(repo: &Path) -> anyhow::Result<Option<gix_url::Url>> {
9797

9898
fn handle(
9999
mode: Mode,
100-
kind: gix::Kind,
100+
kind: gix::repository::Kind,
101101
git_workdir: &Path,
102102
canonicalized_destination: &Path,
103103
progress: &mut impl Progress,
104104
) -> anyhow::Result<()> {
105-
if let gix::Kind::WorkTree { is_linked: true } = kind {
105+
if let gix::repository::Kind::WorkTree { is_linked: true } = kind {
106106
return Ok(());
107107
}
108108
fn to_relative(path: PathBuf) -> PathBuf {
@@ -166,11 +166,11 @@ fn handle(
166166
.join(to_relative({
167167
let mut path = gix_url::expand_path(None, url.path.as_bstr())?;
168168
match kind {
169-
gix::Kind::Submodule => {
169+
gix::repository::Kind::Submodule => {
170170
unreachable!("BUG: We should not try to relocated submodules and not find them the first place")
171171
}
172-
gix::Kind::Bare => path,
173-
gix::Kind::WorkTree { .. } => {
172+
gix::repository::Kind::Bare => path,
173+
gix::repository::Kind::WorkTree { .. } => {
174174
if let Some(ext) = path.extension() {
175175
if ext == "git" {
176176
path.set_extension("");

0 commit comments

Comments
 (0)