]> git.phdru.name Git - git-scripts.git/blob - locate-all
Feat(fix-detached-head): Replace `branch -r` by `for-each-ref`
[git-scripts.git] / locate-all
1 #! /bin/sh
2 locate -b \*.git |
3    grep -v "/archive/SQLObject/\|/archive/cheetah3/\|$HOME/tmp/\|/third-party/" |
4    while read path; do
5       if [ -d "$path" ]; then # skip files `.git` - they're submodules
6          if [ "`basename \"$path\"`" = .git ]; then
7             dirname "$path" # translate `project/.git/` to just `project/`
8          else
9             echo "$path" # bare repo `project.git/`
10          fi
11       fi
12    done |
13 LC_ALL=C sort -u > locate-all.list