Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- error() {
- echo Usage: git-reviews WHO
- echo
- echo WHO is the name of a remove reviewer
- exit
- }
- WHO=$1
- test -z $WHO && error
- git fetch $WHO +refs/notes/*:refs/notes/$WHO/*
- COMMENTS=$(git ls-tree --name-only refs/notes/$WHO/commits)
- KEEP=()
- for C in $COMMENTS; do
- if git rev-list master..review|grep $C 2>&1 >/dev/null; then
- KEEP=(${KEEP[@]-} $(echo $C))
- fi
- done
- test ${#KEEP[@]} -gt 0 && git show $KEEP
Add Comment
Please, Sign In to add comment