]> git.ipfire.org Git - thirdparty/git.git/commit - git-submodule.sh
git-submodule.sh: make the "$cached" variable a boolean
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 28 Jun 2022 10:05:25 +0000 (12:05 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Jun 2022 20:13:17 +0000 (13:13 -0700)
commit757d0927976cf9d59a050f8f9ce1fe54d4dff653
tree38c60eec59bd5e1a98b08c47706dd90a2a0358c3
parent960fad98e8a8d4c123bb5040f616f856cb9925ea
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>
git-submodule.sh