Skip to content
Snippets Groups Projects
Commit dc18ffdd authored by Eric Zillmann's avatar Eric Zillmann
Browse files

#22 changed method of branch state check to use grep instead of wildcard...

#22 changed method of branch state check to use grep instead of wildcard matching to make sure the match is exact
parent e45ca11f
No related branches found
No related tags found
1 merge request!10#22 changed method of branch state check to use grep instead of wildcard...
......@@ -15,8 +15,7 @@ branch="$(git rev-parse --abbrev-ref HEAD)"
if [ $force -eq 0 ]; then
echo '> check for changes'
OUTPUT=$(git remote show origin)
if [[ $OUTPUT == *"$branch "*"pushes to $branch "*"(up to date)"* ]]; then
if git remote show origin | grep "^ *$branch *pushes to $branch *(up to date)" >/dev/null; then
echo "> unchanged, cancel"
exit
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment