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>
This commit is contained in:

committed by
Junio C Hamano

parent
3ad0ba7227
commit
b86f0f9071
@ -40,11 +40,11 @@ init=
|
|||||||
require_init=
|
require_init=
|
||||||
files=
|
files=
|
||||||
remote=
|
remote=
|
||||||
nofetch=
|
no_fetch=
|
||||||
rebase=
|
rebase=
|
||||||
merge=
|
merge=
|
||||||
checkout=
|
checkout=
|
||||||
custom_name=
|
name=
|
||||||
depth=
|
depth=
|
||||||
progress=
|
progress=
|
||||||
dissociate=
|
dissociate=
|
||||||
@ -52,7 +52,7 @@ single_branch=
|
|||||||
jobs=
|
jobs=
|
||||||
recommend_shallow=
|
recommend_shallow=
|
||||||
filter=
|
filter=
|
||||||
deinit_all=
|
all=
|
||||||
default=
|
default=
|
||||||
summary_limit=
|
summary_limit=
|
||||||
for_status=
|
for_status=
|
||||||
@ -108,11 +108,11 @@ cmd_add()
|
|||||||
;;
|
;;
|
||||||
--name)
|
--name)
|
||||||
case "$2" in '') usage ;; esac
|
case "$2" in '') usage ;; esac
|
||||||
custom_name="--name=$2"
|
name="--name=$2"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--name=*)
|
--name=*)
|
||||||
custom_name="$1"
|
name="$1"
|
||||||
;;
|
;;
|
||||||
--depth)
|
--depth)
|
||||||
case "$2" in '') usage ;; esac
|
case "$2" in '') usage ;; esac
|
||||||
@ -149,7 +149,7 @@ cmd_add()
|
|||||||
${reference:+"$reference"} \
|
${reference:+"$reference"} \
|
||||||
${ref_format:+"$ref_format"} \
|
${ref_format:+"$ref_format"} \
|
||||||
$dissociate \
|
$dissociate \
|
||||||
${custom_name:+"$custom_name"} \
|
${name:+"$name"} \
|
||||||
${depth:+"$depth"} \
|
${depth:+"$depth"} \
|
||||||
-- \
|
-- \
|
||||||
"$@"
|
"$@"
|
||||||
@ -240,7 +240,7 @@ cmd_deinit()
|
|||||||
quiet=$1
|
quiet=$1
|
||||||
;;
|
;;
|
||||||
--all)
|
--all)
|
||||||
deinit_all=$1
|
all=$1
|
||||||
;;
|
;;
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
@ -259,7 +259,7 @@ cmd_deinit()
|
|||||||
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper deinit \
|
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper deinit \
|
||||||
$quiet \
|
$quiet \
|
||||||
$force \
|
$force \
|
||||||
$deinit_all \
|
$all \
|
||||||
-- \
|
-- \
|
||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
@ -294,7 +294,7 @@ cmd_update()
|
|||||||
remote=$1
|
remote=$1
|
||||||
;;
|
;;
|
||||||
-N|--no-fetch)
|
-N|--no-fetch)
|
||||||
nofetch=$1
|
no_fetch=$1
|
||||||
;;
|
;;
|
||||||
-f|--force)
|
-f|--force)
|
||||||
force=$1
|
force=$1
|
||||||
@ -381,7 +381,7 @@ cmd_update()
|
|||||||
$remote \
|
$remote \
|
||||||
$recursive \
|
$recursive \
|
||||||
$init \
|
$init \
|
||||||
$nofetch \
|
$no_fetch \
|
||||||
$rebase \
|
$rebase \
|
||||||
$merge \
|
$merge \
|
||||||
$checkout \
|
$checkout \
|
||||||
|
Reference in New Issue
Block a user