]> git.nbdom.net Git - nb.git/commitdiff
bin/nb-update
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 13 Jan 2018 03:26:55 +0000 (03:26 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 13 Jan 2018 03:26:55 +0000 (03:26 +0000)
bin/nb-update
etc/profile.d/git.sh

index afc8c20d1bbdbbb6974d980f39c29b71f2c7cb74..385d2fd4ae672b00d4edec87ee0cab3ab1570a1f 100755 (executable)
@@ -28,15 +28,30 @@ export GIT_SSH="$TMP"
 #
 # Repos
 #
+filter_name="$@"
 for repo in $(nb_repos); do
 
   [ -d "$repo/.git" ] || continue
   cd "$repo" || continue
 
+  # name from git not from path
   name=$(git_name) || continue
   [ -z "$name" ] && continue
   #name="$(basename $repo)"
 
+
+  # args filter on name
+  if [ -n "$filter_name" ]; then
+    match=0
+    for i in $@; do
+      case "$name" in
+       $i) match=1; break ;;
+       #*) echo ">$i!=$name" ;;
+      esac
+    done
+    [ "$match" = "1" ] || continue
+  fi
+
   branch=$(git_branch) || continue
   [ -z "$branch" ] && continue
 
index 1f3a707398b342ac4baaf73fe071be270e9d4d19..7ea9cdceb25580137834e4efae5955d10526a2f6 100644 (file)
@@ -8,7 +8,7 @@ unset -f git_create_branch 2>&1 | true
 
 alias git_grep="git grep --color=auto"
 alias git_ls_tree="git ls-tree --full-tree -r HEAD"
-alias git_ls_files="git ls-files"
+alias git_ls_files="git ls-files --full-name"
 
 git_new_branch() {
        git checkout -b "$1"