git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: Git Mailing List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>,
	Johan Herland <johan@herland.net>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Andy Parkins <andyparkins@gmail.com>
Subject: [RFC PATCH 0/2] Teach "git status" the "--ignore-submodules" option
Date: Fri, 25 Jun 2010 16:55:07 +0200	[thread overview]
Message-ID: <4C24C34B.20403@web.de> (raw)

The first patch in this series lets "git submodule summary" and "git
submodule status" ignore dirty submodules. I thought about teaching
them a "--ignore" option too, but didn't for two reasons: First, the
output of those commands is pretty much focused on commits. Second,
when using "git status" with the config option 'status.submodulesummary'
the submodule tree is scanned twice, once for "git status" and then
again for "git submodule summary". With this patch the second run is
gone, which is a big gain for users of 'status.submodulesummary' with
large submodules.

The second patch teaches "git status" the same "--ignore-submodules"
option that "git diff" recently learned. Ignoring all changes also
suppresses the output of "git submodule summary" when
'status.submodulesummary' is set.

After this series I am planning to add a config option 'ignore' to
.gitmodules, which can be set for each submodule to either "all",
"dirty", "untracked" or "none" (the default). "git diff" and "git
status" will use that config value for each submodule. Using
"--ignore-submodule" overrides this default (and the new parameter
"none" will be added there to able to override the config settings).
And to avoid having to do "git submdule sync" every time that option
changes, I would like to search for it in .git/config first. If it
is not found there, it will be taken from .gitmodules, if present.
So users can override the setting but if they don't, upstream can
change it easily (e.g. when a submodules .gitignore has been updated
so that "ignore=untracked" is no longer necessary anymore it can be
removed). Also switching branches will have an effect instantly if
the 'ignore' entry in .gitmodules is different between branches.


Opinions?


Jens Lehmann (2):
  git submodule: ignore dirty submodules for summary and status
  Add the option "--ignore-submodules" to "git status"

 Documentation/git-status.txt |   11 ++++
 builtin/commit.c             |    7 ++-
 diff.c                       |   15 +----
 git-submodule.sh             |    6 +-
 submodule.c                  |   13 ++++
 submodule.h                  |    3 +
 t/t7508-status.sh            |  127 ++++++++++++++++++++++++++++++++++++++++++
 wt-status.c                  |   10 +++-
 wt-status.h                  |    1 +
 9 files changed, 177 insertions(+), 16 deletions(-)

-- 
1.7.1.757.g0ad3c.dirty

             reply	other threads:[~2010-06-25 14:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25 14:55 Jens Lehmann [this message]
2010-06-25 14:56 ` [PATCH 1/2] git submodule: ignore dirty submodules for summary and status Jens Lehmann
2010-06-25 14:56 ` [PATCH 2/2] Add the option "--ignore-submodules" to "git status" Jens Lehmann
2010-06-25 18:24 ` [RFC PATCH 0/2] Teach "git status" the "--ignore-submodules" option Junio C Hamano
2010-06-25 19:01   ` git-gui and gitk-git as submodules (Re: [RFC PATCH 0/2] Teach "git status" the "--ignore-submodules" option) Jonathan Nieder
2010-06-26  4:44     ` Tay Ray Chuan
2010-06-26 11:45       ` Jens Lehmann
2010-06-26 18:31         ` git-gui and gitk-git as submodules Jonathan Nieder
2010-06-28 18:58           ` Jens Lehmann
2010-06-28 18:29         ` git-gui and gitk-git as submodules (Re: [RFC PATCH 0/2] Teach "git status" the "--ignore-submodules" option) Marc Branchaud
2010-06-28 19:00           ` Jens Lehmann
2010-06-28 19:55             ` Marc Branchaud

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C24C34B.20403@web.de \
    --to=jens.lehmann@web.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johan@herland.net \
    /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.
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 NNTP newsgroup(s).