File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
gix-worktree/tests/fixtures Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -12,18 +12,23 @@ date >vulnerable
1212EOF
1313}
1414
15+ # Initialize the repository.
1516repo=" $1 "
1617git init -- " $repo "
1718cd -- " $repo "
1819branch=" $( git symbolic-ref --short HEAD) "
1920
21+ # Create the blob of the payload.
2022blob_hash=" $( emit_payload | git hash-object -w --stdin) "
2123escaped_blob_hash=" $( printf ' %s' " $blob_hash " | sed ' s/../\\x&/g' ) "
24+
25+ # Create the top-level tree object referencing the blob with the stange name.
2226tree_hash=" $(
2327 printf ' %s %s\0' " $escaped_blob_hash " " $filemode " " $filename " |
2428 git hash-object -t tree -w --stdin
2529) "
30+
31+ # Commit the tree as an initial commit, setting the default branch to it.
2632commit_hash=" $( git commit-tree -m ' Initial commit' " $tree_hash " ) "
2733git branch -f -- " $branch " " $commit_hash "
28-
2934git show
You can’t perform that action at this time.
0 commit comments