Simplify checking exit code 0.
This commit is contained in:
parent
16a8ff2d6d
commit
08827d56e1
@ -42,9 +42,7 @@ local_supported || eval 'local() {
|
||||
|
||||
# See if we're in a repo, and what VCS are we using.
|
||||
find_repo() {
|
||||
svn info >/dev/null 2>&1
|
||||
|
||||
if [ ${?} -eq 0 ]; then
|
||||
if svn info >/dev/null 2>&1; then
|
||||
SC_VCS=svn
|
||||
elif hg tip 2>/dev/null; then
|
||||
SC_VCS=hg
|
||||
@ -53,8 +51,7 @@ find_repo() {
|
||||
remotes=$(git branch -r 2>/dev/null)
|
||||
|
||||
if [ ${?} -ne 127 -a ${?} -ne 128 ]; then
|
||||
echo "${remotes}" | grep git-svn >/dev/null 2>&1
|
||||
if [ ${?} -eq 0 ]; then
|
||||
if echo "${remotes}" | grep git-svn >/dev/null 2>&1; then
|
||||
SC_VCS=git-svn
|
||||
else
|
||||
SC_VCS=git
|
||||
|
Loading…
Reference in New Issue
Block a user