submodule: document default behavior

submodule's default behavior wasn't documented in both git-submodule.txt and in the usage text of git-submodule. Document the default behavior similar to how git-remote does it. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Feb 15, 2019 at 01:26 UTC 68cabbfda36b2e515802e13753637a987c4cf9a9
2 files changed +6 -1
Documentation/git-submodule.txt
+4
@@ -9,6 +9,7 @@ git-submodule - Initialize, update or inspect submodules
9 SYNOPSIS
10 --------
11 [verse]
12 +'git submodule' [--quiet] [--cached]
13 'git submodule' [--quiet] add [<options>] [--] <repository> [<path>]
14 'git submodule' [--quiet] status [--cached] [--recursive] [--] [<path>...]
15 'git submodule' [--quiet] init [--] [<path>...]
@@ -28,6 +29,9 @@ For more information about submodules, see linkgit:gitsubmodules[7].
29
30 COMMANDS
31 --------
32 +With no arguments, shows the status of existing submodules. Several
33 +subcommands are available to perform operations on the submodules.
34 +
35 add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--depth <depth>] [--] <repository> [<path>]::
36 Add the given repository as a submodule at the given path
37 to the changeset to be committed next to the current
git-submodule.sh
+2 -1
@@ -5,7 +5,8 @@
5 # Copyright (c) 2007 Lars Hjemli
6
7 dashless=$(basename "$0" | sed -e 's/-/ /')
8 -USAGE="[--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
8 +USAGE="[--quiet] [--cached]
9 + or: $dashless [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
10 or: $dashless [--quiet] status [--cached] [--recursive] [--] [<path>...]
11 or: $dashless [--quiet] init [--] [<path>...]
12 or: $dashless [--quiet] deinit [-f|--force] (--all| [--] <path>...)