X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc;h=7731b9cdd7c0652302300b7571bb663c4b134726;hb=1f027ea146ea6c62002a8f67f831273a5c431b52;hp=a5c645c52c8fc309e86c20685e07bd4296263643;hpb=ef3bbffe6d2a08ebd735ba4f09c7bd0fbea585a0;p=distro-setup diff --git a/brc b/brc index a5c645c..7731b9c 100644 --- a/brc +++ b/brc @@ -2474,29 +2474,19 @@ skmodified() { } -# sk on all the files in current git repo (except those excluded) +# sk on all the files in current git repo skgit() { - local f toplevel orig_dir tmp skip pattern - local -a ls_files excludes sk_files + local f toplevel orig_dir tmp + local -a ls_files sk_files toplevel=$(git rev-parse --show-toplevel) if [[ $PWD != "$toplevel" ]]; then orig_dir=$PWD cd $toplevel fi - excludes=( - 'disabled/*' - ) - tmp=$(git ls-files | shuf) + # tracked & untracked files + tmp=$(git ls-files && git ls-files --others --exclude-standard) mapfile -t ls_files <<<"$tmp" for f in "${ls_files[@]}"; do - skip=false - for pattern in "${excludes[@]}"; do - if [[ $f == $pattern ]]; then - skip=true - break - fi - done - if $skip; then continue; fi if sk-p "$f"; then sk_files+=("$f") fi