prevent-foxtrot: format file
This commit is contained in:
parent
ec59721459
commit
cde7d73594
@ -29,16 +29,15 @@ do
|
|||||||
# Should appear once as a parent
|
# Should appear once as a parent
|
||||||
# awk: print the second word
|
# awk: print the second word
|
||||||
# The second word is the first parent. Third word would be second parent, ...
|
# The second word is the first parent. Third word would be second parent, ...
|
||||||
MATCH=`git log --first-parent --pretty='%H %P' $oldrev..$newrev |
|
MATCH=`git log --first-parent --pretty='%H %P' $oldrev..$newrev | grep $oldrev | awk '{ print $2 }'`
|
||||||
grep $oldrev |
|
|
||||||
awk '{ print $2 }'`
|
# First parent should be the oldrev
|
||||||
# First parent should be the oldrev
|
if [ "$oldrev" = "$MATCH" ]; then
|
||||||
if [ "$oldrev" = "$MATCH" ]; then
|
exit 0
|
||||||
exit 0
|
else
|
||||||
else
|
echo >&2 "*** Push rejected! Foxtrot merge blocked! ***"
|
||||||
echo >&2 "*** Push rejected! Foxtrot merge blocked! ***"
|
echo "See: https://blog.developer.atlassian.com/stop-foxtrots-now/"
|
||||||
echo "See: https://blog.developer.atlassian.com/stop-foxtrots-now/"
|
exit 1
|
||||||
exit 1
|
fi
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user