aboutsummaryrefslogtreecommitdiffstats
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-06-28 12:05:30 +0200
committerJunio C Hamano <gitster@pobox.com>2022-06-28 13:13:17 -0700
commit36d45163b6de05886c2c6feb2e626ce423b96b3b (patch)
treeecaa158e2ac62d8ceca0655dac5fc431ce47af6d /git-submodule.sh
parent6e556c412e9283cfa9f9be4bfe4e9c813a53bf52 (diff)
downloadgit-36d45163b6de05886c2c6feb2e626ce423b96b3b.tar.gz
submodule--helper: report "submodule" as our name in some "-h" output
Change the user-facing "git submodule--helper" commands so that they'll report their name as being "git submodule". To a user these commands are internal implementation details, and it doesn't make sense to emit usage about an internal helper when "git submodule" is invoked with invalid options. Before this we'd emit e.g.: $ git submodule absorbgitdirs --blah error: unknown option `blah' usage: git submodule--helper absorbgitdirs [<options>] [<path>...] [...] And: $ git submodule set-url -- -- usage: git submodule--helper set-url [--quiet] <path> <newurl> [...] Now we'll start with "usage: git submodule [...]" in both of those cases. This change does not alter the "list", "name", "clone", "config" and "create-branch" commands, those are internal-only (as an aside; their usage info should probably invoke BUG(...)). This only changes the user-facing commands. The "status", "deinit" and "update" commands are not included in this change, because their usage information already used "submodule" rather than "submodule--helper". I don't think it's currently possible to emit some of this usage information in practice, as git-submodule.sh will catch unknown options, and e.g. it doesn't seem to be possible to get "add" to emit its usage information from "submodule--helper". Though that change may be superfluous now, it's also harmless, and will allow us to eventually dispatch further into "git submodule--helper" from git-submodule.sh, while emitting the correct usage output. 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')
0 files changed, 0 insertions, 0 deletions