add git-each
1 files changed, 19 insertions(+), 0 deletions(-) A overlay/bin/git-each
A overlay/bin/git-each => overlay/bin/git-each +19 -0
@@ 0,0 1,19 @@ #!/bin/sh # Runs the command '$@' on every git commit repo="$(git rev-parse --show-toplevel)" tmp="$(mktemp -d)" cd "$tmp" git clone "$repo" ./ > /dev/null 2>&1 git fetch --all > /dev/null 2>&1 git pull > /dev/null 2>&1 git rev-list --all | while read -r commit ; do git checkout "$commit" > /dev/null 2>&1 export commit="$commit" sh -c "$@" done cd /tmp rm -rf "$tmp"