mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
check git submodule status before declaring success
This commit is contained in:
parent
4bb273a802
commit
5ea4a626a6
|
|
@ -27,5 +27,10 @@ git add .gitmodules
|
|||
|
||||
# 3. Need to confirm and commit the changes for yourself
|
||||
echo
|
||||
echo "Now submodule $NAME is deleted."
|
||||
if git submodule status >/dev/null 2>&1 \
|
||||
&& ! git submodule status | grep "$NAME"; then
|
||||
echo "Successfully deleted $NAME."
|
||||
else
|
||||
echo "Failed to delete $NAME." 1>&2 && exit 6
|
||||
fi
|
||||
echo 'Confirm with `git submodule status` and commit the changes for yourself.'
|
||||
|
|
|
|||
Loading…
Reference in a new issue