Skip to content

Commit

Permalink
test: Redact HASH for git pack files
Browse files Browse the repository at this point in the history
  • Loading branch information
dieterplex committed Jul 16, 2024
1 parent 56dde27 commit 1afdad1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/cargo-test-support/src/compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,12 @@ fn add_regex_redactions(subs: &mut snapbox::Redactions) {
regex!(r"\.cargo/target/(?<redacted>[0-9a-f]{2}/[0-9a-f]{14})"),
)
.unwrap();
subs.insert("[HASH]", regex!(r"/[a-z0-9\-_]+-(?<redacted>[0-9a-f]{16})"))
subs.insert(
"[HASH]",
regex!(r"/[a-z0-9\-_]+-(?<redacted>[0-9a-f]{16})\b"),
)
.unwrap();
subs.insert("[HASH]", regex!(r"/pack-(?<redacted>[0-9a-f]{40})\."))
.unwrap();
subs.insert(
"[AVG_ELAPSED]",
Expand Down

0 comments on commit 1afdad1

Please sign in to comment.