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
10
10
allwsmode=false
11
11
quiet=false
12
12
no_follow_symlinks=false
13
+ no_follow_hidden=false
13
14
14
15
#
15
16
# print usage message
16
17
#
17
18
usage () {
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>"
19
20
echo 1>&2 " git bulk --addworkspace <ws-name> <ws-root-directory> (--from <URL or file>)"
20
21
echo 1>&2 " git bulk --removeworkspace <ws-name>"
21
22
echo 1>&2 " git bulk --addcurrent <ws-name>"
@@ -172,7 +173,10 @@ function executBulkOp () {
172
173
cd " $gitrepodir " || exit 1 # into git repo location
173
174
local curdir=$PWD
174
175
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
176
180
cd " $rwsdir " || exit 1 # back to origin location of last find command
177
181
done
178
182
done
@@ -193,6 +197,8 @@ while [ "${#}" -ge 1 ] ; do
193
197
butilcommand=" ${1: 2} " && wsname=" $2 " && wsdir=" $3 " && if [ " $4 " == " --from" ]; then source=" $5 " ; fi && break ;;
194
198
--no-follow-symlinks)
195
199
no_follow_symlinks=true ;;
200
+ --no-follow-hidden)
201
+ no_follow_hidden=true ;;
196
202
-a)
197
203
allwsmode=true ;;
198
204
-g)
Original file line number Diff line number Diff line change @@ -135,6 +135,8 @@ _git-bulk() {
135
135
' -g[Ask the user for confirmation on every execution (guarded mode).]' \
136
136
' -w[Run the git command on the specified workspace.]:workspace-name:__gitex_workspace_names' \
137
137
' -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.]' \
138
140
' --addworkspace[Register a workspace for bulk operations.]' \
139
141
' --removeworkspace[Remove the specified workspace.]:workspace-name:__gitex_workspace_names' \
140
142
' --addcurrent[Adds the current directory as workspace to git bulk operations]' \
Original file line number Diff line number Diff line change 4
4
.SH "NAME"
5
5
\fB git \- bulk \fR \- Run git commands on multiple repositories
6
6
.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
8
8
.br
9
9
\fB git \- bulk \fR \-\- addworkspace
10
10
.br
@@ -37,6 +37,10 @@ Ask the user for confirmation on every execution\.
37
37
.P
38
38
Do not traverse symbolic links under the workspace when searching for git repositories\.
39
39
.P
40
+ \-\- no\- follow\- hidden
41
+ .P
42
+ Do not traverse hidden (dotted) directories under the workspace when searching for git repositories\.
43
+ .P
40
44
\- w <ws\- name>
41
45
.P
42
46
Run 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
3
3
4
4
## SYNOPSIS
5
5
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 />
7
7
` git-bulk ` --addworkspace < ; ws-name> ; < ; ws-root-directory> ; (--from < ; URL or file> ; ) <br />
8
8
` git-bulk ` --removeworkspace < ; ws-name> ; <br />
9
9
` git-bulk ` --addcurrent < ; ws-name> ; <br />
@@ -32,6 +32,10 @@ git bulk adds convenient support for operations that you want to execute on mult
32
32
33
33
Do not traverse symbolic links under the workspace when searching for git repositories.
34
34
35
+ --no-follow-hidden
36
+
37
+ Do not traverse hidden (dotted) directories under the workspace when searching for git repositories.
38
+
35
39
-w < ; ws-name> ;
36
40
37
41
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