From: Alexey Izbyshev <izbyshev@ispras.ru>
To: git@vger.kernel.org
Cc: bwilliamseng@gmail.com
Subject: Re: [BUG] git commit -a doesn't ignore inactive/ignore-all submodules
Date: Tue, 24 Aug 2021 18:49:46 +0300 [thread overview]
Message-ID: <128d535af65ec58af9a26b9d0e13de8e@ispras.ru> (raw)
In-Reply-To: <1be1e064559578a190f32dddb8ad39a0@ispras.ru>
On 2021-08-20 20:02, Alexey Izbyshev wrote:
> Reproduced on 2.33 and 2.17.1. Does not reproduce on 2.7.4 (Ubuntu
> 16.04).
Bisected to:
commit 5556808690ea245708fb80383be5c1afee2fb3eb
Author: Brandon Williams <bmwill@google.com>
Date: Tue Jul 25 14:39:16 2017 -0700
add, reset: ensure submodules can be added or reset
Commit aee9c7d65 (Submodules: Add the new "ignore" config option for
diff and status) introduced the ignore configuration option for
submodules so that configured submodules could be omitted from the
status and diff commands. Because this flag is respected in the
diff
machinery it has the unintended consequence of potentially
prohibiting
users from adding or resetting a submodule, even when a path to the
submodule is explicitly given.
Ensure that submodules can be added or set, even if they are
configured
to be ignored, by setting the `DIFF_OPT_OVERRIDE_SUBMODULE_CONFIG`
diff
flag.
Was the change of "git commit -a" behavior intended?
To be clear, I don't understand what problem this patch solves exactly.
The commit message mentions issues with "adding or resetting a
submodule", but with git 2.7.4 (older than this patch) I can explicitly
"git add" and "git commit" a submodule which has "ignore = all" set
without problems, though "git status" and "git commit -a" ignore it, as
I would expect.
I've also performed another test uncovering that "submodule.active"
appears to have never been honored by "git commit -a" at all. Is this
intended behavior?
From my perspective, it's surprising that "git status" and "git commit
-a" take inactive submodules into account. Given that "git help config"
says that "submodule.active" is a "Boolean value indicating if the
submodule is of interest to git commands", it would seem to me that
"active = false" should beat everything else, making git behave as if
submodule were not initialized. Is there a way to keep a submodule
checked out but make "git commit -a" ignore it?
Alexey
prev parent reply other threads:[~2021-08-24 15:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-20 17:02 [BUG] git commit -a doesn't ignore inactive/ignore-all submodules Alexey Izbyshev
2021-08-24 15:49 ` Alexey Izbyshev [this message]
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=128d535af65ec58af9a26b9d0e13de8e@ispras.ru \
--to=izbyshev@ispras.ru \
--cc=bwilliamseng@gmail.com \
--cc=git@vger.kernel.org \
/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).