Check that the only .gitignore file in repository is the ./.gitignore during precommit testing.
This commit is contained in:
@@ -24,6 +24,18 @@ BUILD_INFO=`echo -e "$CPPCHECK_INFO\n$VERA_INFO\n$GCC_INFO"`
|
|||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
gitignore_files_list=`find . -name .gitignore`
|
||||||
|
|
||||||
|
if [ "$gitignore_files_list" != "./.gitignore" ]
|
||||||
|
then
|
||||||
|
echo -e "\n\e[1;33mInvalid .gitignore configuration\e[0m\n"
|
||||||
|
echo -e -n ".gitignore files list:\t"
|
||||||
|
echo $gitignore_files_list
|
||||||
|
echo
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "`git status --porcelain 2>&1 | wc -l`" != "0" ]
|
if [ "`git status --porcelain 2>&1 | wc -l`" != "0" ]
|
||||||
then
|
then
|
||||||
echo -e "\n \e[1;90m$GIT_STATUS_NOT_CLEAN_MSG:\n"
|
echo -e "\n \e[1;90m$GIT_STATUS_NOT_CLEAN_MSG:\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user