git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roy Eldar <royeldar0@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Eric Sunshine" <sunshine@sunshineco.com>,
	"Roy Eldar" <royeldar0@gmail.com>
Subject: [PATCH v2 8/8] git-submodule.sh: rename some variables
Date: Mon,  9 Dec 2024 18:50:09 +0200	[thread overview]
Message-ID: <20241209165009.40653-9-royeldar0@gmail.com> (raw)
In-Reply-To: <20241209165009.40653-1-royeldar0@gmail.com>

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" and "$deinit_all" in order to improve consistency.

Signed-off-by: Roy Eldar <royeldar0@gmail.com>
---
 git-submodule.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index 2da4d55d64..9c10472b5f 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -44,7 +44,7 @@ nofetch=
 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 \
 		-- \
 		"$@"
 }
-- 
2.30.2


  parent reply	other threads:[~2024-12-09 16:51 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-07 13:51 [PATCH 0/3] git-submodule.sh: improve parsing of options Roy Eldar
2024-12-07 13:51 ` [PATCH 1/3] git-submodule.sh: make some variables boolean Roy Eldar
2024-12-07 23:43   ` Junio C Hamano
2024-12-08  0:06   ` Eric Sunshine
2024-12-07 13:52 ` [PATCH 2/3] git-submodule.sh: improve parsing of some long options Roy Eldar
2024-12-07 13:52 ` [PATCH 3/3] git-submodule.sh: improve parsing of short options Roy Eldar
2024-12-08  0:02   ` Junio C Hamano
2024-12-09 16:21     ` Roy E
2024-12-09 16:50 ` [PATCH v2 0/8] git-submodule.sh: improve parsing of options Roy Eldar
2024-12-09 16:50   ` [PATCH v2 1/8] git-submodule.sh: make some variables boolean Roy Eldar
2024-12-09 16:50   ` [PATCH v2 2/8] git-submodule.sh: improve parsing of some long options Roy Eldar
2024-12-09 16:50   ` [PATCH v2 3/8] git-submodule.sh: improve parsing of short options Roy Eldar
2024-12-09 16:50   ` [PATCH v2 4/8] git-submodule.sh: get rid of isnumber Roy Eldar
2024-12-09 16:50   ` [PATCH v2 5/8] git-submodule.sh: get rid of unused variable Roy Eldar
2024-12-09 16:50   ` [PATCH v2 6/8] git-submodule.sh: add some comments Roy Eldar
2024-12-09 16:50   ` [PATCH v2 7/8] git-submodule.sh: improve variables readability Roy Eldar
2024-12-09 16:50   ` Roy Eldar [this message]
2024-12-09 23:26   ` [PATCH v2 0/8] git-submodule.sh: improve parsing of options Junio C Hamano
2024-12-10  0:50     ` Junio C Hamano
2024-12-10 18:11     ` Roy E
2024-12-11  0:02       ` Junio C Hamano
2024-12-11  6:13         ` Roy E
2024-12-11  6:16           ` Junio C Hamano
2024-12-10 18:44   ` [PATCH v3 0/7] " Roy Eldar
2024-12-10 18:44     ` [PATCH v3 1/7] git-submodule.sh: improve parsing of some long options Roy Eldar
2024-12-10 18:44     ` [PATCH v3 2/7] git-submodule.sh: improve parsing of short options Roy Eldar
2024-12-10 18:44     ` [PATCH v3 3/7] git-submodule.sh: get rid of isnumber Roy Eldar
2024-12-10 18:44     ` [PATCH v3 4/7] git-submodule.sh: get rid of unused variable Roy Eldar
2024-12-10 18:44     ` [PATCH v3 5/7] git-submodule.sh: add some comments Roy Eldar
2024-12-10 18:44     ` [PATCH v3 6/7] git-submodule.sh: improve variables readability Roy Eldar
2024-12-11  0:14       ` Junio C Hamano
2024-12-11  6:21         ` Roy E
2024-12-11  1:56       ` Đoàn Trần Công Danh
2024-12-11  6:09         ` Junio C Hamano
2024-12-10 18:44     ` [PATCH v3 7/7] git-submodule.sh: rename some variables Roy Eldar
2024-12-11  6:32     ` [PATCH v4 0/7] git-submodule.sh: improve parsing of options Roy Eldar
2024-12-11  6:32       ` [PATCH v4 1/7] git-submodule.sh: improve parsing of some long options Roy Eldar
2024-12-11  6:32       ` [PATCH v4 2/7] git-submodule.sh: improve parsing of short options Roy Eldar
2024-12-11  6:32       ` [PATCH v4 3/7] git-submodule.sh: get rid of isnumber Roy Eldar
2024-12-11  6:32       ` [PATCH v4 4/7] git-submodule.sh: get rid of unused variable Roy Eldar
2024-12-11  6:32       ` [PATCH v4 5/7] git-submodule.sh: add some comments Roy Eldar
2024-12-11  6:32       ` [PATCH v4 6/7] git-submodule.sh: improve variables readability Roy Eldar
2024-12-11  6:32       ` [PATCH v4 7/7] git-submodule.sh: rename some variables Roy Eldar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241209165009.40653-9-royeldar0@gmail.com \
    --to=royeldar0@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).