Skip to content

Commit 071475b

Browse files
committed
Provide a package implementation with gix-status.
This should also help fixing these spurious "cannot package because some excluded file is untracked" issues.
1 parent 6af75d7 commit 071475b

File tree

7 files changed

+405
-13
lines changed

7 files changed

+405
-13
lines changed

Cargo.lock

Lines changed: 65 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ flate2 = { version = "1.1.1", default-features = false, features = ["zlib-rs"] }
4949
git2 = "0.20.0"
5050
git2-curl = "0.21.0"
5151
# When updating this, also see if `gix-transport` further down needs updating or some auth-related tests will fail.
52-
gix = { git = "https://github.com/GitoxideLabs/gitoxide", branch = "improvements", version = "0.72.1", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk"] }
52+
gix = { git = "https://github.com/GitoxideLabs/gitoxide", branch = "improvements", version = "0.72.1", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk", "status"] }
5353
glob = "0.3.2"
5454
handlebars = { version = "6.3.1", features = ["dir_source"] }
5555
hex = "0.4.3"

src/cargo/ops/cargo_package/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,13 @@ fn prepare_archive(
450450
let src_files = src.list_files(pkg)?;
451451

452452
// Check (git) repository state, getting the current commit hash.
453-
let vcs_info = vcs::check_repo_state(pkg, &src_files, ws, &opts)?;
453+
// TODO: where is the feature toggle?
454+
let use_gix = true;
455+
let vcs_info = if use_gix {
456+
vcs::gix::check_repo_state(pkg, &src_files, ws, &opts)
457+
} else {
458+
vcs::check_repo_state(pkg, &src_files, ws, &opts)
459+
}?;
454460

455461
build_ar_list(ws, pkg, src_files, vcs_info, opts.include_lockfile)
456462
}

0 commit comments

Comments
 (0)