Skip to content

Commit abb53fb

Browse files
committed
Adapt to changes in gix
1 parent 518fbbc commit abb53fb

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

gitoxide-core/src/repository/archive.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn stream(
3030
let (mut stream, index) = repo.worktree_stream(tree)?;
3131
if !add_paths.is_empty() {
3232
let root = gix::path::realpath(
33-
repo.work_dir()
33+
repo.workdir()
3434
.ok_or_else(|| anyhow!("Adding files requires a worktree directory that contains them"))?,
3535
)?;
3636
for path in add_paths {

gitoxide-core/src/repository/attributes/query.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub(crate) mod function {
8383
gix::worktree::stack::state::attributes::Source::WorktreeThenIdMapping
8484
.adjust_for_bare(repo.is_bare()),
8585
)?;
86-
let workdir = repo.work_dir();
86+
let workdir = repo.workdir();
8787
for pattern in pathspec.search().patterns() {
8888
let path = pattern.path();
8989
let entry = cache.at_entry(

gitoxide-core/src/repository/attributes/validate_baseline.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub(crate) mod function {
114114
};
115115
let work_dir = ignore
116116
.then(|| {
117-
repo.work_dir()
117+
repo.workdir()
118118
.map(ToOwned::to_owned)
119119
.ok_or_else(|| anyhow!("repository at {:?} must have a worktree checkout", repo.path()))
120120
})
@@ -249,7 +249,7 @@ pub(crate) mod function {
249249
}
250250
bail!(
251251
"{}: Validation failed with {} mismatches out of {}",
252-
gix::path::realpath(repo.work_dir().unwrap_or(repo.git_dir()))?.display(),
252+
gix::path::realpath(repo.workdir().unwrap_or(repo.git_dir()))?.display(),
253253
mismatches.len(),
254254
progress.counter().load(Ordering::Relaxed)
255255
);

gitoxide-core/src/repository/clean.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub(crate) mod function {
5353
if format != OutputFormat::Human {
5454
bail!("JSON output isn't implemented yet");
5555
}
56-
let Some(workdir) = repo.work_dir() else {
56+
let Some(workdir) = repo.workdir() else {
5757
bail!("Need a worktree to clean, this is a bare repository");
5858
};
5959

gitoxide-core/src/repository/exclude.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub fn query(
6060
let mut pathspec = repo.pathspec(
6161
true,
6262
patterns.iter(),
63-
repo.work_dir().is_some(),
63+
repo.workdir().is_some(),
6464
&index,
6565
gix::worktree::stack::state::attributes::Source::WorktreeThenIdMapping.adjust_for_bare(repo.is_bare()),
6666
)?;
@@ -82,12 +82,12 @@ pub fn query(
8282
let pathspec = repo.pathspec(
8383
true,
8484
patterns.iter(),
85-
repo.work_dir().is_some(),
85+
repo.workdir().is_some(),
8686
&index,
8787
gix::worktree::stack::state::attributes::Source::WorktreeThenIdMapping
8888
.adjust_for_bare(repo.is_bare()),
8989
)?;
90-
let workdir = repo.work_dir();
90+
let workdir = repo.workdir();
9191
for pattern in pathspec.search().patterns() {
9292
let path = pattern.path();
9393
let entry = cache.at_entry(

gitoxide-core/src/repository/merge/file.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub fn file(
4040
let base_id = repo.rev_parse_single(base.as_bstr()).ok();
4141
let ours_id = repo.rev_parse_single(ours.as_bstr()).ok();
4242
let theirs_id = repo.rev_parse_single(theirs.as_bstr()).ok();
43-
let roots = worktree_roots(base_id, ours_id, theirs_id, repo.work_dir())?;
43+
let roots = worktree_roots(base_id, ours_id, theirs_id, repo.workdir())?;
4444

4545
let mut cache = repo.merge_resource_cache(roots)?;
4646
let null = repo.object_hash().null();

0 commit comments

Comments
 (0)