Skip to content

Instantly share code, notes, and snippets.

@simonLeary42
Created September 11, 2025 14:32
Show Gist options
  • Save simonLeary42/bcddfbba012722cf54ea8a982d2b986a to your computer and use it in GitHub Desktop.
Save simonLeary42/bcddfbba012722cf54ea8a982d2b986a to your computer and use it in GitHub Desktop.
#!/bin/bash
set -euo pipefail
trap 'git checkout -q main' EXIT
trap 'git checkout -q main' INT
git checkout -q main
for commit in $(git rev-list HEAD); do
git checkout -q "$commit"
if grep -q init webroot/admin/pi-mgmt.php; then
echo "init found! $commit"
exit
else
echo "$commit"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment