From: Felipe Contreras Date: Fri, 25 Apr 2014 18:12:41 GMT Subject: [PATCH v2 try2 08/14] submodule: add --staged options Message-ID: <1398449567-16314-9-git-send-email-felipe.contreras@gmail.com> In-Reply-To: <1398449567-16314-1-git-send-email-felipe.contreras@gmail.com> Synonym for --cached. Signed-off-by: Felipe Contreras --- Documentation/git-submodule.txt | 8 ++++++-- git-submodule.sh | 10 +++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index bfef8a0..904e007 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -11,13 +11,13 @@ SYNOPSIS [verse] 'git submodule' [--quiet] add [-b ] [-f|--force] [--name ] [--reference ] [--depth ] [--] [] -'git submodule' [--quiet] status [--cached] [--recursive] [--] [...] +'git submodule' [--quiet] status [--cached|--staged] [--recursive] [--] [...] 'git submodule' [--quiet] init [--] [...] 'git submodule' [--quiet] deinit [-f|--force] [--] ... 'git submodule' [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--rebase] [--reference ] [--depth ] [--merge] [--recursive] [--] [...] -'git submodule' [--quiet] summary [--cached|--files] [(-n|--summary-limit) ] +'git submodule' [--quiet] summary [--cached|--staged|--files] [(-n|--summary-limit) ] [commit] [--] [...] 'git submodule' [--quiet] foreach [--recursive] 'git submodule' [--quiet] sync [--] [...] @@ -248,6 +248,10 @@ OPTIONS commands typically use the commit found in the submodule HEAD, but with this option, the commit stored in the index is used instead. + +--staged:: + Synonym for `--cached`. + --files:: This option is only valid for the summary command. This command compares the commit in the index with that in the submodule HEAD diff --git a/git-submodule.sh b/git-submodule.sh index 4a30087..af6df79 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -6,11 +6,11 @@ dashless=$(basename "$0" | sed -e 's/-/ /') USAGE="[--quiet] add [-b ] [-f|--force] [--name ] [--reference ] [--] [] - or: $dashless [--quiet] status [--cached] [--recursive] [--] [...] + or: $dashless [--quiet] status [--cached|--staged] [--recursive] [--] [...] or: $dashless [--quiet] init [--] [...] or: $dashless [--quiet] deinit [-f|--force] [--] ... or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--rebase] [--reference ] [--merge] [--recursive] [--] [...] - or: $dashless [--quiet] summary [--cached|--files] [--summary-limit ] [commit] [--] [...] + or: $dashless [--quiet] summary [--cached|--staged|--files] [--summary-limit ] [commit] [--] [...] or: $dashless [--quiet] foreach [--recursive] or: $dashless [--quiet] sync [--recursive] [--] [...]" OPTIONS_SPEC= @@ -995,7 +995,7 @@ cmd_summary() { while test $# -ne 0 do case "$1" in - --cached) + --cached|--staged) cached="$1" ;; --files) @@ -1200,7 +1200,7 @@ cmd_status() -q|--quiet) GIT_QUIET=1 ;; - --cached) + --cached|--staged) cached=1 ;; --recursive) @@ -1367,7 +1367,7 @@ do esac branch="$2"; shift ;; - --cached) + --cached|--staged) cached="$1" ;; --) -- 1.9.2+fc1.2.gfbaae8c