Skip to content

Commit

Permalink
git-submodule.sh: rename some variables
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Roy Eldar authored and gitster committed Dec 11, 2024
1 parent 3ad0ba7 commit b86f0f9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions git-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ init=
require_init=
files=
remote=
nofetch=
no_fetch=
rebase=
merge=
checkout=
custom_name=
name=
depth=
progress=
dissociate=
single_branch=
jobs=
recommend_shallow=
filter=
deinit_all=
all=
default=
summary_limit=
for_status=
Expand Down Expand Up @@ -108,11 +108,11 @@ cmd_add()
;;
--name)
case "$2" in '') usage ;; esac
custom_name="--name=$2"
name="--name=$2"
shift
;;
--name=*)
custom_name="$1"
name="$1"
;;
--depth)
case "$2" in '') usage ;; esac
Expand Down Expand Up @@ -149,7 +149,7 @@ cmd_add()
${reference:+"$reference"} \
${ref_format:+"$ref_format"} \
$dissociate \
${custom_name:+"$custom_name"} \
${name:+"$name"} \
${depth:+"$depth"} \
-- \
"$@"
Expand Down Expand Up @@ -240,7 +240,7 @@ cmd_deinit()
quiet=$1
;;
--all)
deinit_all=$1
all=$1
;;
--)
shift
Expand All @@ -259,7 +259,7 @@ cmd_deinit()
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper deinit \
$quiet \
$force \
$deinit_all \
$all \
-- \
"$@"
}
Expand Down Expand Up @@ -294,7 +294,7 @@ cmd_update()
remote=$1
;;
-N|--no-fetch)
nofetch=$1
no_fetch=$1
;;
-f|--force)
force=$1
Expand Down Expand Up @@ -381,7 +381,7 @@ cmd_update()
$remote \
$recursive \
$init \
$nofetch \
$no_fetch \
$rebase \
$merge \
$checkout \
Expand Down

0 comments on commit b86f0f9

Please sign in to comment.