Change _find_git_repos function fixing situation when no one repo was found by "c --rebuild" when $GIT_REPO_DIR is symbolic link

This commit is contained in:
coodix
2012-05-20 22:41:08 +04:00
parent b48ea28cb1
commit 97721437c9

View File

@@ -123,7 +123,7 @@ _git_index_dirs_without_home() {
function _find_git_repos() { function _find_git_repos() {
# Find all unarchived projects # Find all unarchived projects
IFS=$'\n' IFS=$'\n'
for repo in $(find "$GIT_REPO_DIR" -maxdepth 4 -name ".git" -type d \! -wholename '*/archive/*'); do for repo in $(find -L "$GIT_REPO_DIR" -maxdepth 4 -name ".git" -type d \! -wholename '*/archive/*'); do
echo ${repo%/.git} # Return project folder, with trailing ':' echo ${repo%/.git} # Return project folder, with trailing ':'
_find_git_submodules $repo # Detect any submodules _find_git_submodules $repo # Detect any submodules
done done