while read path; do
if [ -d "$path" ]; then # skip files `.git` - they're submodules
if [ "`basename \"$path\"`" = .git ]; then
- dirname "$path"
+ dirname "$path" # translate `project/.git/` to just `project/`
else
- echo "$path"
+ echo "$path" # bare repo `project.git/`
fi
fi
done |
- LC_ALL=C sort | uniq > locate-all.list
+LC_ALL=C sort -u > locate-all.list