File tree Expand file tree Collapse file tree 5 files changed +25
-5
lines changed
Expand file tree Collapse file tree 5 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,13 @@ singlemode=false
1010allwsmode=false
1111quiet=false
1212no_follow_symlinks=false
13+ no_follow_hidden=false
1314
1415#
1516# print usage message
1617#
1718usage () {
18- echo 1>&2 " usage: git bulk [--no-follow-symlinks] [-q|--quiet] [-g] ([-a]|[-w <ws-name>]) <git command>"
19+ echo 1>&2 " usage: git bulk [--no-follow-symlinks] [--no-follow-hidden] [- q|--quiet] [-g] ([-a]|[-w <ws-name>]) <git command>"
1920 echo 1>&2 " git bulk --addworkspace <ws-name> <ws-root-directory> (--from <URL or file>)"
2021 echo 1>&2 " git bulk --removeworkspace <ws-name>"
2122 echo 1>&2 " git bulk --addcurrent <ws-name>"
@@ -172,7 +173,10 @@ function executBulkOp () {
172173 cd " $gitrepodir " || exit 1 # into git repo location
173174 local curdir=$PWD
174175 local leadingpath=${curdir# " ${actual} " }
175- guardedExecution " $@ "
176+ # do not execute if we do not want to consider a ".git" directory under a hidden directory
177+ if [ $no_follow_hidden = false ] || ! [[ " $leadingpath " =~ " /." ]]; then
178+ guardedExecution " $@ "
179+ fi
176180 cd " $rwsdir " || exit 1 # back to origin location of last find command
177181 done
178182 done
@@ -193,6 +197,8 @@ while [ "${#}" -ge 1 ] ; do
193197 butilcommand=" ${1: 2} " && wsname=" $2 " && wsdir=" $3 " && if [ " $4 " == " --from" ]; then source=" $5 " ; fi && break ;;
194198 --no-follow-symlinks)
195199 no_follow_symlinks=true ;;
200+ --no-follow-hidden)
201+ no_follow_hidden=true ;;
196202 -a)
197203 allwsmode=true ;;
198204 -g)
Original file line number Diff line number Diff line change @@ -135,6 +135,8 @@ _git-bulk() {
135135 ' -g[Ask the user for confirmation on every execution (guarded mode).]' \
136136 ' -w[Run the git command on the specified workspace.]:workspace-name:__gitex_workspace_names' \
137137 ' -q[Suppress bulk output about current execution (quiet mode).]' \
138+ ' --no-follow-symlinks[Do not traverse symbolic links when searching for git repositories.]' \
139+ ' --no-follow-hidden[Do not traverse hidden directories when searching for git repositories.]' \
138140 ' --addworkspace[Register a workspace for bulk operations.]' \
139141 ' --removeworkspace[Remove the specified workspace.]:workspace-name:__gitex_workspace_names' \
140142 ' --addcurrent[Adds the current directory as workspace to git bulk operations]' \
Original file line number Diff line number Diff line change 44.SH "NAME"
55\fB git \- bulk \fR \- Run git commands on multiple repositories
66.SH "SYNOPSIS"
7- \fB git \- bulk \fR [\- g] [\-\- no\- follow\- symlinks] ([\- a]|[\- w
7+ \fB git \- bulk \fR [\- g] [\-\- no\- follow\- symlinks] [ \-\- no \- follow \- hidden] ([\- a]|[\- w
88.br
99\fB git \- bulk \fR \-\- addworkspace
1010.br
@@ -37,6 +37,10 @@ Ask the user for confirmation on every execution\.
3737.P
3838Do not traverse symbolic links under the workspace when searching for git repositories\.
3939.P
40+ \-\- no\- follow\- hidden
41+ .P
42+ Do not traverse hidden (dotted) directories under the workspace when searching for git repositories\.
43+ .P
4044\- w <ws\- name>
4145.P
4246Run the git command on the specified workspace\. The workspace must be registered\.
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ git-bulk(1) -- Run git commands on multiple repositories
33
44## SYNOPSIS
55
6- ` git-bulk ` [ -g] [ --no-follow-symlinks] ([ -a] |[ -w < ; ws-name> ; ] ) < ; git command> ; <br />
6+ ` git-bulk ` [ -g] [ --no-follow-symlinks] [ --no-follow-hidden ] ([ -a] |[ -w < ; ws-name> ; ] ) < ; git command> ; <br />
77` git-bulk ` --addworkspace < ; ws-name> ; < ; ws-root-directory> ; (--from < ; URL or file> ; ) <br />
88` git-bulk ` --removeworkspace < ; ws-name> ; <br />
99` git-bulk ` --addcurrent < ; ws-name> ; <br />
@@ -32,6 +32,10 @@ git bulk adds convenient support for operations that you want to execute on mult
3232
3333 Do not traverse symbolic links under the workspace when searching for git repositories.
3434
35+ --no-follow-hidden
36+
37+ Do not traverse hidden (dotted) directories under the workspace when searching for git repositories.
38+
3539 -w < ; ws-name> ;
3640
3741 Run the git command on the specified workspace. The workspace must be registered.
You can’t perform that action at this time.
0 commit comments