From: Shourya Shukla <shouryashukla.oo@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, christian.couder@gmail.com,
kaartic.sivaraam@gmail.com, johannes.schindelin@gmx.de,
liu.denton@gmail.com, Shourya Shukla <shouryashukla.oo@gmail.com>,
Christian Couder <chriscool@tuxfamily.org>
Subject: [PATCH v2 1/5] submodule: expose the '--for-status' option of summary
Date: Thu, 6 Aug 2020 22:10:58 +0530 [thread overview]
Message-ID: <20200806164102.6707-2-shouryashukla.oo@gmail.com> (raw)
In-Reply-To: <20200806164102.6707-1-shouryashukla.oo@gmail.com>
The 'for-status' option is used to compute the summary of submodule(s)
in a superproject by skipping the ignored submdules i.e., those with
'submodule.<name>.ignore' set to 'all' in the '.gitmodules' or
'.git/config', with the latter taking precedence over the former.
The option was introduced in d0f64dd44d (git-submodule summary:
--for-status option, 2008-04-12), refined in 3ba7407b8b (submodule
summary: ignore --for-status option, 2013-09-06) and finally perfected
in 927b26f87a (submodule: don't print status output with ignore=all,
2013-09-01). But, it was not mentioned in the 'git submodule'
Documentation.
Expose the '--for-status' option accepted by the command 'git submodule
summary'.
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>
---
Documentation/git-submodule.txt | 8 +++++++-
contrib/completion/git-completion.bash | 2 +-
git-submodule.sh | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 7e5f995f77..d944e4c817 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -190,7 +190,7 @@ set-url [--] <path> <newurl>::
automatically synchronize the submodule's new remote URL
configuration.
-summary [--cached|--files] [(-n|--summary-limit) <n>] [commit] [--] [<path>...]::
+summary [--cached|--files] [--for-status] [(-n|--summary-limit) <n>] [commit] [--] [<path>...]::
Show commit summary between the given commit (defaults to HEAD) and
working tree/index. For a submodule in question, a series of commits
in the submodule between the given super project commit and the
@@ -309,6 +309,12 @@ OPTIONS
compares the commit in the index with that in the submodule HEAD
when this option is used.
+--for-status::
+ This option is only valid for the summary command. This command
+ skips the submodules with `submodule.<name>.ignore` set to `all`
+ in the `.gitmodules` or `.git/config`. The configuration in
+ `.git/config` overrides the configuration in `.gitmodules`.
+
-n::
--summary-limit::
This option is only valid for the summary command.
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 0fdb5da83b..2b7b033c17 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -3059,7 +3059,7 @@ _git_submodule ()
__gitcomp "--default --branch"
;;
summary,--*)
- __gitcomp "--cached --files --summary-limit"
+ __gitcomp "--cached --files --for-status --summary-limit"
;;
foreach,--*|sync,--*)
__gitcomp "--recursive"
diff --git a/git-submodule.sh b/git-submodule.sh
index 43eb6051d2..dda3fee167 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -13,7 +13,7 @@ USAGE="[--quiet] [--cached]
or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-shallow] [--reference <repository>] [--recursive] [--[no-]single-branch] [--] [<path>...]
or: $dashless [--quiet] set-branch (--default|--branch <branch>) [--] <path>
or: $dashless [--quiet] set-url [--] <path> <newurl>
- or: $dashless [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
+ or: $dashless [--quiet] summary [--cached|--files] [--for-status] [--summary-limit <n>] [commit] [--] [<path>...]
or: $dashless [--quiet] foreach [--recursive] <command>
or: $dashless [--quiet] sync [--recursive] [--] [<path>...]
or: $dashless [--quiet] absorbgitdirs [--] [<path>...]"
--
2.28.0
next prev parent reply other threads:[~2020-08-06 16:51 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-06 16:40 [GSoC][PATCH v2 0/5] submodule: port subcommand 'summary' from shell to C Shourya Shukla
2020-08-06 16:40 ` Shourya Shukla [this message]
2020-08-08 14:40 ` [PATCH v2 1/5] submodule: expose the '--for-status' option of summary Kaartic Sivaraam
2020-08-08 20:25 ` Christian Couder
2020-08-08 23:26 ` Junio C Hamano
2020-08-06 16:40 ` [PATCH v2 2/5] submodule: remove extra line feeds between callback struct and macro Shourya Shukla
2020-08-06 16:41 ` [PATCH v2 3/5] submodule: rename helper functions to avoid ambiguity Shourya Shukla
2020-08-06 16:41 ` [PATCH v2 4/5] t7421: introduce a test script for verifying 'summary' output Shourya Shukla
2020-08-06 16:41 ` [PATCH v2 5/5] submodule: port submodule subcommand 'summary' from shell to C Shourya Shukla
2020-08-06 22:45 ` Junio C Hamano
2020-08-07 16:31 ` Shourya Shukla
2020-08-07 17:15 ` Junio C Hamano
2020-08-12 19:44 ` [GSoC][PATCH v3 0/4] submodule: port " Shourya Shukla
2020-08-12 19:44 ` [PATCH v3 1/4] submodule: remove extra line feeds between callback struct and macro Shourya Shukla
2020-08-12 19:44 ` [PATCH v3 2/4] submodule: rename helper functions to avoid ambiguity Shourya Shukla
2020-08-12 19:44 ` [PATCH v3 3/4] t7421: introduce a test script for verifying 'summary' output Shourya Shukla
2020-08-12 19:44 ` [PATCH v3 4/4] submodule: port submodule subcommand 'summary' from shell to C Shourya Shukla
2020-08-18 2:08 ` Jeff King
2020-08-21 5:22 ` Shourya Shukla
2020-08-21 15:17 ` Johannes Schindelin
2020-08-21 16:35 ` Junio C Hamano
2020-08-21 17:17 ` Shourya Shukla
2020-08-21 18:09 ` Junio C Hamano
2020-08-21 18:54 ` Kaartic Sivaraam
2020-08-21 19:54 ` Junio C Hamano
2020-08-23 20:03 ` Kaartic Sivaraam
2020-08-23 20:12 ` Kaartic Sivaraam
2020-08-24 7:26 ` Shourya Shukla
2020-08-24 8:46 ` Shourya Shukla
2020-08-24 11:08 ` Kaartic Sivaraam
2020-08-24 17:50 ` Shourya Shukla
2020-08-24 17:54 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200806164102.6707-2-shouryashukla.oo@gmail.com \
--to=shouryashukla.oo@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
--cc=kaartic.sivaraam@gmail.com \
--cc=liu.denton@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).