Skip to content

Instantly share code, notes, and snippets.

@shtrih
Last active January 2, 2016 16:29
Show Gist options
  • Save shtrih/8330323 to your computer and use it in GitHub Desktop.
Save shtrih/8330323 to your computer and use it in GitHub Desktop.
#!/bin/bash
src='/home/http/local'
patch='/home/http/rights'
#enable for loops over items with spaces in their name
IFS=$'\n'
for dir in `ls "$src/"`
do
if [ -d "$src/$dir" -a -d "$src/$dir/.git" ]; then
cd "$src/$dir" \
&& git log --exit-code --grep='Fix: права на редактирование картиннок' > /dev/null 2> /dev/null \
|| {
#echo "Найден плохой коммит $src/$dir";
{
git log devel ^fc41181b --grep='Fix \[pic_crop\] обрезка миниатюр' > /dev/null 2> /dev/null #\
#&& git log devel 1485756 ^fc41181b --exit-code > /dev/null 2> /dev/null
} \
|| {
echo "$src/$dir" \
#chgrp -R users . && chmod -R a+rw .
#git am --abort
#git am $patch/*
}
}
#
# Ищем, где есть плохой коммит (74c0924), нет ли хорошего коммита или патча (1485756, Fix \[pic_crop\] обрезка миниатюр), выводим где не пропатчено
# fc41181b - левый коммит, название которого совпадает с хорошим коммитом
fi
done
echo
echo "Done."
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment