summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Eldar <royeldar0@gmail.com>2024-12-11 07:32:34 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-11 12:46:48 +0100
commitb86f0f9071dd881a14cb9a71d94a66ae3186a2b9 (patch)
tree5e5bfa67f751b0a19223a0981b6eb41a0998f938
parentgit-submodule.sh: improve variables readability (diff)
downloadgit-b86f0f9071dd881a14cb9a71d94a66ae3186a2b9.tar.xz
git-b86f0f9071dd881a14cb9a71d94a66ae3186a2b9.zip
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 <royeldar0@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-submodule.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 6df25efc48..2999b31fad 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -40,11 +40,11 @@ init=
require_init=
files=
remote=
-nofetch=
+no_fetch=
rebase=
merge=
checkout=
-custom_name=
+name=
depth=
progress=
dissociate=
@@ -52,7 +52,7 @@ single_branch=
jobs=
recommend_shallow=
filter=
-deinit_all=
+all=
default=
summary_limit=
for_status=
@@ -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
@@ -149,7 +149,7 @@ cmd_add()
${reference:+"$reference"} \
${ref_format:+"$ref_format"} \
$dissociate \
- ${custom_name:+"$custom_name"} \
+ ${name:+"$name"} \
${depth:+"$depth"} \
-- \
"$@"
@@ -240,7 +240,7 @@ cmd_deinit()
quiet=$1
;;
--all)
- deinit_all=$1
+ all=$1
;;
--)
shift
@@ -259,7 +259,7 @@ cmd_deinit()
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper deinit \
$quiet \
$force \
- $deinit_all \
+ $all \
-- \
"$@"
}
@@ -294,7 +294,7 @@ cmd_update()
remote=$1
;;
-N|--no-fetch)
- nofetch=$1
+ no_fetch=$1
;;
-f|--force)
force=$1
@@ -381,7 +381,7 @@ cmd_update()
$remote \
$recursive \
$init \
- $nofetch \
+ $no_fetch \
$rebase \
$merge \
$checkout \