Single-commit clean baseline after security scrub of niche-tells, project codenames, internal jargon, and contributor-email leaks. Contents: - 100 Rust crates (_primitives/_rust/) - 37 agent manifests (_manifests/) + generated specs (_generated/) - 67 user-invocable skills (skills/) - 33 hooks (hooks/) - Composition blocks (_blocks/) - Documentation (docs/, README.md) - TS adapter packages (_ts_packages/) - Assembler (_assembler/) - Roles (_roles/) - Templates (_templates/) - Forgejo CI (.forgejo/) Author: Denis Parfionovich <info@greendragon.info> License: see LICENSE.
34 lines
1.1 KiB
Bash
Executable file
34 lines
1.1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# mock-git — PATH-shim that no-ops `git push` and delegates everything else
|
|
# to the real git binary. Used by test 8 to let the wizard's full migration
|
|
# flow succeed without needing a real Forgejo git smart-HTTP backend.
|
|
|
|
set -u
|
|
|
|
REAL_GIT="${MOCK_REAL_GIT:-/usr/bin/git}"
|
|
[ -x "$REAL_GIT" ] || REAL_GIT="$(command -v git 2>/dev/null || true)"
|
|
# Re-resolve to skip ourselves.
|
|
if [ -z "$REAL_GIT" ] || [ "$REAL_GIT" = "$0" ]; then
|
|
# Walk PATH to find the next git after our directory.
|
|
OUR_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
OLDIFS="$IFS"; IFS=':'
|
|
for d in $PATH; do
|
|
[ "$d" = "$OUR_DIR" ] && continue
|
|
if [ -x "$d/git" ]; then REAL_GIT="$d/git"; break; fi
|
|
done
|
|
IFS="$OLDIFS"
|
|
fi
|
|
[ -n "$REAL_GIT" ] && [ -x "$REAL_GIT" ] || { echo "mock-git: real git not found" >&2; exit 127; }
|
|
|
|
# Walk arguments looking for the first non-flag, non-key=val word —
|
|
# that's the subcommand. If it's "push", no-op success.
|
|
for a in "$@"; do
|
|
case "$a" in
|
|
-c) continue ;;
|
|
-*=*|*=*) continue ;;
|
|
-*) continue ;;
|
|
push) exit 0 ;;
|
|
*) break ;;
|
|
esac
|
|
done
|
|
exec "$REAL_GIT" "$@"
|