From 541351661b0019ffae42ee83a9e3a69e306f93bd Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sat, 7 May 2016 15:00:55 -0700 Subject: [PATCH] ignore .git in subdir linking --- conflink | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conflink b/conflink index ddf9901..e263e06 100755 --- a/conflink +++ b/conflink @@ -11,6 +11,7 @@ sysv() { shopt -s nullglob +shopt -s extglob # if we make a link back to the root, traversing the subdirs stops. # This makes it so we can do subdir directories. Must call with absolute @@ -20,9 +21,9 @@ subdir-link-r() { local root="$1" local targets=() if [[ $2 ]]; then - targets=( "$2"/* ) + targets=( "$2"/!(.git) ) else - for f in "$1"/*; do + for f in "$1"/!(.git); do [[ -d $f ]] && targets+=("$f") ||: done fi -- 2.30.2