git-submodule.sh: use "$quiet", not "$GIT_QUIET"
Remove the use of the "$GIT_QUIET" variable in favor of our own "$quiet", ever since b3c5f5cb048 (submodule: move core cmd_update() logic to C, 2022-03-15) we have not used the "say" function in git-sh-setup.sh, which is the only thing that's affected by using "GIT_QUIET". We still want to support --quiet for our own use though, but let's use our own variable for that. Now it's obvious that we only care about passing "--quiet" to "git submodule--helper", and not to change the output of any "say" invocation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Jun 28, 2022 at 12:05 UTC
2eec463739745d2110aa5462ba9547fa8d255ebb
1 file changed
+19
-18
git-submodule.sh
+19
-18
@@ -30,6 +30,7 @@ GIT_PROTOCOL_FROM_USER=0
30
export GIT_PROTOCOL_FROM_USER
31
32
command=
33
+quiet=
34
branch=
35
force=
36
reference=
@@ -80,7 +81,7 @@ cmd_add()
81
force=$1
82
;;
83
-q|--quiet)
83
- GIT_QUIET=1
84
+ quiet=1
85
;;
86
--progress)
87
progress=1
@@ -128,7 +129,7 @@ cmd_add()
129
usage
130
fi
131
131
- git ${wt_prefix:+-C "$wt_prefix"} submodule--helper add ${GIT_QUIET:+--quiet} ${force:+--force} ${progress:+"--progress"} ${branch:+--branch "$branch"} ${reference_path:+--reference "$reference_path"} ${dissociate:+--dissociate} ${custom_name:+--name "$custom_name"} ${depth:+"$depth"} -- "$@"
132
+ git ${wt_prefix:+-C "$wt_prefix"} submodule--helper add ${quiet:+--quiet} ${force:+--force} ${progress:+"--progress"} ${branch:+--branch "$branch"} ${reference_path:+--reference "$reference_path"} ${dissociate:+--dissociate} ${custom_name:+--name "$custom_name"} ${depth:+"$depth"} -- "$@"
133
}
134
135
#
@@ -144,7 +145,7 @@ cmd_foreach()
145
do
146
case "$1" in
147
-q|--quiet)
147
- GIT_QUIET=1
148
+ quiet=1
149
;;
150
--recursive)
151
recursive=1
@@ -159,7 +160,7 @@ cmd_foreach()
160
shift
161
done
162
162
- git ${wt_prefix:+-C "$wt_prefix"} submodule--helper foreach ${GIT_QUIET:+--quiet} ${recursive:+--recursive} -- "$@"
163
+ git ${wt_prefix:+-C "$wt_prefix"} submodule--helper foreach ${quiet:+--quiet} ${recursive:+--recursive} -- "$@"
164
}
165
166
#
@@ -174,7 +175,7 @@ cmd_init()
175
do
176
case "$1" in
177
-q|--quiet)
177
- GIT_QUIET=1
178
+ quiet=1
179
;;
180
--)
181
shift
@@ -190,7 +191,7 @@ cmd_init()
191
shift
192
done
193
193
- git ${wt_prefix:+-C "$wt_prefix"} submodule--helper init ${GIT_QUIET:+--quiet} -- "$@"
194
+ git ${wt_prefix:+-C "$wt_prefix"} submodule--helper init ${quiet:+--quiet} -- "$@"
195
}
196
197
#
@@ -207,7 +208,7 @@ cmd_deinit()
208
force=$1
209
;;
210
-q|--quiet)
210
- GIT_QUIET=1
211
+ quiet=1
212
;;
213
--all)
214
deinit_all=t
@@ -226,7 +227,7 @@ cmd_deinit()
227
shift
228
done
229
229
- git ${wt_prefix:+-C "$wt_prefix"} submodule--helper deinit ${GIT_QUIET:+--quiet} ${force:+--force} ${deinit_all:+--all} -- "$@"
230
+ git ${wt_prefix:+-C "$wt_prefix"} submodule--helper deinit ${quiet:+--quiet} ${force:+--force} ${deinit_all:+--all} -- "$@"
231
}
232
233
#
@@ -241,7 +242,7 @@ cmd_update()
242
do
243
case "$1" in
244
-q|--quiet)
244
- GIT_QUIET=1
245
+ quiet=1
246
;;
247
--progress)
248
progress=1
@@ -335,7 +336,7 @@ cmd_update()
336
done
337
338
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper update \
338
- ${GIT_QUIET:+--quiet} \
339
+ ${quiet:+--quiet} \
340
${force:+--force} \
341
${progress:+"--progress"} \
342
${remote:+--remote} \
@@ -396,7 +397,7 @@ cmd_set_branch() {
397
shift
398
done
399
399
- git ${wt_prefix:+-C "$wt_prefix"} submodule--helper set-branch ${GIT_QUIET:+--quiet} ${branch:+--branch "$branch"} ${default:+--default} -- "$@"
400
+ git ${wt_prefix:+-C "$wt_prefix"} submodule--helper set-branch ${quiet:+--quiet} ${branch:+--branch "$branch"} ${default:+--default} -- "$@"
401
}
402
403
#
@@ -409,7 +410,7 @@ cmd_set_url() {
410
do
411
case "$1" in
412
-q|--quiet)
412
- GIT_QUIET=1
413
+ quiet=1
414
;;
415
--)
416
shift
@@ -425,7 +426,7 @@ cmd_set_url() {
426
shift
427
done
428
428
- git ${wt_prefix:+-C "$wt_prefix"} submodule--helper set-url ${GIT_QUIET:+--quiet} -- "$@"
429
+ git ${wt_prefix:+-C "$wt_prefix"} submodule--helper set-url ${quiet:+--quiet} -- "$@"
430
}
431
432
#
@@ -496,7 +497,7 @@ cmd_status()
497
do
498
case "$1" in
499
-q|--quiet)
499
- GIT_QUIET=1
500
+ quiet=1
501
;;
502
--cached)
503
cached=1
@@ -518,7 +519,7 @@ cmd_status()
519
shift
520
done
521
521
- git ${wt_prefix:+-C "$wt_prefix"} submodule--helper status ${GIT_QUIET:+--quiet} ${cached:+--cached} ${recursive:+--recursive} -- "$@"
522
+ git ${wt_prefix:+-C "$wt_prefix"} submodule--helper status ${quiet:+--quiet} ${cached:+--cached} ${recursive:+--recursive} -- "$@"
523
}
524
#
525
# Sync remote urls for submodules
@@ -531,7 +532,7 @@ cmd_sync()
532
do
533
case "$1" in
534
-q|--quiet)
534
- GIT_QUIET=1
535
+ quiet=1
536
shift
537
;;
538
--recursive)
@@ -551,7 +552,7 @@ cmd_sync()
552
esac
553
done
554
554
- git ${wt_prefix:+-C "$wt_prefix"} submodule--helper sync ${GIT_QUIET:+--quiet} ${recursive:+--recursive} -- "$@"
555
+ git ${wt_prefix:+-C "$wt_prefix"} submodule--helper sync ${quiet:+--quiet} ${recursive:+--recursive} -- "$@"
556
}
557
558
cmd_absorbgitdirs()
@@ -572,7 +573,7 @@ do
573
command=$1
574
;;
575
-q|--quiet)
575
- GIT_QUIET=1
576
+ quiet=1
577
;;
578
--cached)
579
cached=1