|
|
@ -5,12 +5,13 @@ |
|
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com> |
|
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com> |
|
|
|
# |
|
|
|
# |
|
|
|
|
|
|
|
|
|
|
|
if [[ "$PWD" != "$(git-root)" ]]; then |
|
|
|
if ! is-true "$(git rev-parse --is-inside-work-tree 2> /dev/null)"; then |
|
|
|
print "$0: must be run from the root of the working tree" >&2 |
|
|
|
print "$0: not a repository work tree: $PWD" >&2 |
|
|
|
return 1 |
|
|
|
return 1 |
|
|
|
fi |
|
|
|
elif [[ "$PWD" != "$(git-root)" ]]; then |
|
|
|
|
|
|
|
print "$0: must be run from the root of the work tree" >&2 |
|
|
|
if ! git config --file .gitmodules --get "submodule.${1}.path" &>/dev/null; then |
|
|
|
return 1 |
|
|
|
|
|
|
|
elif ! git config --file .gitmodules --get "submodule.${1}.path" &>/dev/null; then |
|
|
|
print "$0: submodule not found: $1" >&2 |
|
|
|
print "$0: submodule not found: $1" >&2 |
|
|
|
return 1 |
|
|
|
return 1 |
|
|
|
fi |
|
|
|
fi |
|
|
|