Skip to content

Commit

Permalink
fix: use longhand gitoxide path-spec patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
jemtucker committed Aug 10, 2024
1 parent 972d534 commit 4b3ef96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/cargo/sources/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,11 +610,11 @@ fn list_files_gix(

let pathspec = {
// Include the package root.
let mut include = BString::from(":/");
let mut include = BString::from(":(top)");
include.push_str(package_prefix.as_ref());

// Exclude the target directory.
let mut exclude = BString::from(":!/");
let mut exclude = BString::from(":!(exclude,top)");
exclude.push_str(target_prefix.as_ref());

vec![include, exclude]
Expand Down
13 changes: 1 addition & 12 deletions tests/testsuite/build_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5833,17 +5833,6 @@ fn directory_with_leading_underscore() {
.file("_foo/foo/build.rs", "fn main() { }")
});
p.cargo("build --manifest-path=_foo/foo/Cargo.toml -v")
.with_status(101)
.with_stderr_data(r#"[ERROR] failed to determine package fingerprint for build script for foo v0.1.0 ([ROOT]/foo/_foo/foo)
Caused by:
failed to determine the most recently modified file in [ROOT]/foo/_foo/foo
Caused by:
failed to determine list of files in [ROOT]/foo/_foo/foo
Caused by:
Unimplemented short keyword: '_'
"#)
.with_status(0)
.run();
}

0 comments on commit 4b3ef96

Please sign in to comment.