Interact with VCS directly when checking whole directory removal.
Use VCS functions to check whether the cached/to-be-committed version of the working tree contains the particular directory instead of using the local working tree. Thanks to that, the functions no longer care about stray files.
This commit is contained in:
parent
d50f6a7282
commit
72435c1a73
@ -69,11 +69,9 @@ find_repo() {
|
|||||||
# from the repo.
|
# from the repo.
|
||||||
is_whole_dir_removed() {
|
is_whole_dir_removed() {
|
||||||
if [ ${SC_VCS} = svn ]; then
|
if [ ${SC_VCS} = svn ]; then
|
||||||
local flist
|
[ -z "$(svn status --depth=empty -- "${1}")" ]
|
||||||
flist=$(find "${1}" \( -name '.svn' -prune -o ! -name "${1}" -print \))
|
|
||||||
[ -z "${flist}" ]
|
|
||||||
elif [ ${SC_VCS%-svn} = git ]; then
|
elif [ ${SC_VCS%-svn} = git ]; then
|
||||||
[ ! -e "${1}" ]
|
[ -z "$(git ls-files -c -- "${1}")" ]
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user