Skip to content

Commit b86f0f9

Browse files
Roy Eldargitster
authored andcommitted
git-submodule.sh: rename some variables
Every switch and option which is passed to git-submodule.sh has a corresponding variable which is set accordingly; by convention, the name of the variable is the option name (for example, "--jobs" and "$jobs"). Rename "$custom_name", "$deinit_all" and "$nofetch", for consistency. Signed-off-by: Roy Eldar <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3ad0ba7 commit b86f0f9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

git-submodule.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ init=
4040
require_init=
4141
files=
4242
remote=
43-
nofetch=
43+
no_fetch=
4444
rebase=
4545
merge=
4646
checkout=
47-
custom_name=
47+
name=
4848
depth=
4949
progress=
5050
dissociate=
5151
single_branch=
5252
jobs=
5353
recommend_shallow=
5454
filter=
55-
deinit_all=
55+
all=
5656
default=
5757
summary_limit=
5858
for_status=
@@ -108,11 +108,11 @@ cmd_add()
108108
;;
109109
--name)
110110
case "$2" in '') usage ;; esac
111-
custom_name="--name=$2"
111+
name="--name=$2"
112112
shift
113113
;;
114114
--name=*)
115-
custom_name="$1"
115+
name="$1"
116116
;;
117117
--depth)
118118
case "$2" in '') usage ;; esac
@@ -149,7 +149,7 @@ cmd_add()
149149
${reference:+"$reference"} \
150150
${ref_format:+"$ref_format"} \
151151
$dissociate \
152-
${custom_name:+"$custom_name"} \
152+
${name:+"$name"} \
153153
${depth:+"$depth"} \
154154
-- \
155155
"$@"
@@ -240,7 +240,7 @@ cmd_deinit()
240240
quiet=$1
241241
;;
242242
--all)
243-
deinit_all=$1
243+
all=$1
244244
;;
245245
--)
246246
shift
@@ -259,7 +259,7 @@ cmd_deinit()
259259
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper deinit \
260260
$quiet \
261261
$force \
262-
$deinit_all \
262+
$all \
263263
-- \
264264
"$@"
265265
}
@@ -294,7 +294,7 @@ cmd_update()
294294
remote=$1
295295
;;
296296
-N|--no-fetch)
297-
nofetch=$1
297+
no_fetch=$1
298298
;;
299299
-f|--force)
300300
force=$1
@@ -381,7 +381,7 @@ cmd_update()
381381
$remote \
382382
$recursive \
383383
$init \
384-
$nofetch \
384+
$no_fetch \
385385
$rebase \
386386
$merge \
387387
$checkout \

0 commit comments

Comments
 (0)