Skip to content

Commit a761b9a

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 6833aa7 commit a761b9a

File tree

7 files changed

+482
-8
lines changed

7 files changed

+482
-8
lines changed

Cargo.lock

Lines changed: 60 additions & 0 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.2", default-features = false, features = ["zlib-rs"] }
4949
git2 = "0.20.2"
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 = { version = "0.72.1", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk"] }
52+
gix = { version = "0.72.1", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk", "status"] }
5353
glob = "0.3.2"
5454
# Pinned due to https://github.com/sunng87/handlebars-rust/issues/711
5555
handlebars = { version = "=6.3.1", features = ["dir_source"] }

src/cargo/ops/cargo_package/mod.rs

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

481481
// Check (git) repository state, getting the current commit hash.
482-
let vcs_info = vcs::check_repo_state(pkg, &src_files, ws, &opts)?;
482+
// TODO: where is the feature toggle?
483+
let use_gix = true;
484+
let vcs_info = if use_gix {
485+
vcs::gix::check_repo_state(pkg, &src_files, ws, &opts)
486+
} else {
487+
vcs::check_repo_state(pkg, &src_files, ws, &opts)
488+
}?;
483489

484490
build_ar_list(ws, pkg, src_files, vcs_info, opts.include_lockfile)
485491
}

0 commit comments

Comments
 (0)