Skip to content

Commit 1d9bae2

Browse files
committed
address auto-review
1 parent 2facc6f commit 1d9bae2

5 files changed

Lines changed: 3 additions & 3 deletions

File tree

Binary file not shown.

gix-index/tests/fixtures/make_symlink_prefix_reuse_advisory.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ target_file_blob=$(echo -n ../../payload | git hash-object -w --stdin)
1010
subtree=$(printf '120000 blob %s\tpost-checkout\n' "$target_file_blob" | git mktree)
1111

1212
hex2bin() {
13-
perl -e 'print pack("H*", $ARGV[0])' "$1"
13+
python3 -c 'import sys; sys.stdout.buffer.write(bytes.fromhex(sys.argv[1]))' "$1"
1414
}
1515

1616
root_tree() {
Binary file not shown.

gix/tests/fixtures/make_symlink_prefix_reuse_advisory.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ target_file_blob=$(echo -n ../../payload | git hash-object -w --stdin)
1111
subtree=$(printf '120000 blob %s\tpost-checkout\n' "$target_file_blob" | git mktree)
1212

1313
hex2bin() {
14-
perl -e 'print pack("H*", $ARGV[0])' "$1"
14+
python3 -c 'import sys; sys.stdout.buffer.write(bytes.fromhex(sys.argv[1]))' "$1"
1515
}
1616

1717
# The root tree intentionally reuses the path prefix `a` with incompatible

gix/tests/gix/clone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ mod blocking_io {
571571
let git_dir = repo.git_dir();
572572
let hook_path = git_dir.join("hooks").join("post-checkout");
573573
assert!(
574-
hook_path.symlink_metadata().is_err(),
574+
!hook_path.is_symlink(),
575575
"checkout must not write attacker-controlled hooks through a symlink prefix"
576576
);
577577

0 commit comments

Comments
 (0)