Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-06-28 13:05:25 +0300
committerJunio C Hamano <gitster@pobox.com>2022-06-28 23:13:17 +0300
commit757d0927976cf9d59a050f8f9ce1fe54d4dff653 (patch)
tree38c60eec59bd5e1a98b08c47706dd90a2a0358c3 /git-submodule.sh
parent960fad98e8a8d4c123bb5040f616f856cb9925ea (diff)
git-submodule.sh: make the "$cached" variable a boolean
Remove the assignment of "$1" to the "$cached" variable. As seen in the initial implementation in 70c7ac22de6 (Add git-submodule command, 2007-05-26) we only need to keep track of if we've seen the --cached option, not save the "--cached" string for later use. In 28f9af5d25e (git-submodule summary: code framework, 2008-03-11) "$1" was assigned to it, but since there was no reason to do so let's stop doing it. This trivial change will make it easier to reason about an eventual change that'll remove the cmd_summary() function in favor of dispatching to "git submodule--helper summary" directly. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 53847bbf6e..b99a00d9f8 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -446,7 +446,7 @@ cmd_summary() {
do
case "$1" in
--cached)
- cached="$1"
+ cached=1
;;
--files)
files="$1"
@@ -583,7 +583,7 @@ do
branch="$2"; shift
;;
--cached)
- cached="$1"
+ cached=1
;;
--)
break