public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: "Claus Schneider(Eficode) via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Brandon Williams" <bwilliams.eng@gmail.com>,
	"Phillip Wood" <phillip.wood123@gmail.com>,
	"Claus Schneider" <claus.schneider@eficode.com>,
	"Claus Schneider" <claus.schneider@eficode.com>,
	"Claus Schneider(Eficode)" <claus.schneider@eficode.com>
Subject: [PATCH v3 5/5] Documentation: update add --force option + ignore=all config
Date: Wed, 14 Jan 2026 07:47:59 +0000	[thread overview]
Message-ID: <37fe7956e089394bb1d75f4c8af4a3347b204803.1768376879.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1987.v3.git.1768376879.gitgitgadget@gmail.com>

From: "Claus Schneider(Eficode)" <claus.schneider@eficode.com>

- git-add.adoc: Update the --force documentation for submodule behaviour
  to be added even the given configuration ignore=all.
- gitmodules.adoc and config/submodule.adoc: The submodule config
  ignore=all now need --force in order to update the index.

Signed-off-by: Claus Schneider(Eficode) <claus.schneider@eficode.com>
---
 Documentation/config/submodule.adoc | 13 +++++++------
 Documentation/git-add.adoc          |  5 ++++-
 Documentation/gitmodules.adoc       |  5 ++++-
 3 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/Documentation/config/submodule.adoc b/Documentation/config/submodule.adoc
index 0672d99117..250a6133d8 100644
--- a/Documentation/config/submodule.adoc
+++ b/Documentation/config/submodule.adoc
@@ -32,15 +32,16 @@ submodule.<name>.fetchRecurseSubmodules::
 
 submodule.<name>.ignore::
 	Defines under what circumstances "git status" and the diff family show
-	a submodule as modified. When set to "all", it will never be considered
-	modified (but it will nonetheless show up in the output of status and
-	commit when it has been staged), "dirty" will ignore all changes
-	to the submodule's work tree and
+	a submodule as modified.
+	Set to "all" will never consider the submodule modified. It can
+	nevertheless be staged using the option --force and it will then show up
+	in the output of status.
+	Set to "dirty" will ignore all changes to the submodule's work tree and
 	takes only differences between the HEAD of the submodule and the commit
 	recorded in the superproject into account. "untracked" will additionally
 	let submodules with modified tracked files in their work tree show up.
-	Using "none" (the default when this option is not set) also shows
-	submodules that have untracked files in their work tree as changed.
+	Set to "none"(default) It is also shows submodules that have untracked
+	files in their work tree as changed.
 	This setting overrides any setting made in .gitmodules for this submodule,
 	both settings can be overridden on the command line by using the
 	"--ignore-submodules" option. The 'git submodule' commands are not
diff --git a/Documentation/git-add.adoc b/Documentation/git-add.adoc
index 6192daeb03..941135dc63 100644
--- a/Documentation/git-add.adoc
+++ b/Documentation/git-add.adoc
@@ -75,7 +75,10 @@ in linkgit:gitglossary[7].
 
 `-f`::
 `--force`::
-	Allow adding otherwise ignored files.
+	Allow adding otherwise ignored files. The option is also used when
+	`submodule.<name>.ignore=all` is set, but you want to stage an
+	update of the submodule. The `path` to the submodule must be explicitly
+	specified.
 
 `--sparse`::
 	Allow updating index entries outside of the sparse-checkout cone.
diff --git a/Documentation/gitmodules.adoc b/Documentation/gitmodules.adoc
index d9bec8b187..3792da96aa 100644
--- a/Documentation/gitmodules.adoc
+++ b/Documentation/gitmodules.adoc
@@ -70,7 +70,10 @@ submodule.<name>.ignore::
 --
 	all;; The submodule will never be considered modified (but will
 	    nonetheless show up in the output of status and commit when it has
-	    been staged).
+	    been staged). Add `(new commits)` can be overruled using the
+	    `git add --force <submodule.path>`.
+		The setting affects `status`, `update-index`, `diff` and `log`(due
+		to underlaying `diff`).
 
 	dirty;; All changes to the submodule's work tree will be ignored, only
 	    committed differences between the `HEAD` of the submodule and its
-- 
gitgitgadget

  parent reply	other threads:[~2026-01-14  7:48 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-18 20:07 [PATCH 0/5] git-add : Respect submodule ignore=all and only add changes with --force Claus Schneider via GitGitGadget
2025-10-18 20:07 ` [PATCH 1/5] read-cache: update add_files_to_cache to take param ignored_too(--force) Claus Schneider(Eficode) via GitGitGadget
2025-10-18 20:07 ` [PATCH 2/5] read-cache: let read-cache respect submodule ignore=all and --force Claus Schneider(Eficode) via GitGitGadget
2025-10-18 20:07 ` [PATCH 3/5] tests: add new t2206-add-submodule-ignored.sh to test ignore=all scenario Claus Schneider(Eficode) via GitGitGadget
2025-10-18 20:07 ` [PATCH 4/5] tests: fix existing tests when add an ignore=all submodule Claus Schneider(Eficode) via GitGitGadget
2025-10-18 20:07 ` [PATCH 5/5] Documentation: update add --force and submodule ignore=all config Claus Schneider(Eficode) via GitGitGadget
2025-10-19 15:34 ` [PATCH 0/5] git-add : Respect submodule ignore=all and only add changes with --force Phillip Wood
     [not found]   ` <CA+GP4bpu3SUycG35DU5+NSuiqtfYN9-R=7d01EFhexgGh4sRPg@mail.gmail.com>
2025-10-20  7:28     ` Claus Schneider
     [not found]   ` <CA+GP4bqb775U5oBbLZg1dou+THJOjTbFN+2Pq1cBPqq1SgbxHw@mail.gmail.com>
2025-10-24 13:55     ` Phillip Wood
2025-11-13 12:51       ` Claus Schneider
2025-11-13 18:10 ` [PATCH v2 " Claus Schneider via GitGitGadget
2025-11-13 18:10   ` [PATCH v2 1/5] read-cache: update add_files_to_cache take param include_ignored_submodules Claus Schneider(Eficode) via GitGitGadget
2025-11-13 22:07     ` Junio C Hamano
2025-11-13 18:10   ` [PATCH v2 2/5] read-cache: add/read-cache respect submodule ignore=all Claus Schneider(Eficode) via GitGitGadget
2025-11-13 18:10   ` [PATCH v2 3/5] tests: add new t2206-add-submodule-ignored.sh to test ignore=all scenario Claus Schneider(Eficode) via GitGitGadget
2025-11-13 18:10   ` [PATCH v2 4/5] tests: fix existing tests when add an ignore=all submodule Claus Schneider(Eficode) via GitGitGadget
2025-11-13 18:10   ` [PATCH v2 5/5] Documentation: add --include_ignored_submodules + ignore=all config Claus Schneider(Eficode) via GitGitGadget
2025-11-13 19:58   ` [PATCH v2 0/5] git-add : Respect submodule ignore=all and only add changes with --force Junio C Hamano
2025-11-14 13:53     ` Claus Schneider
2026-02-05  8:51       ` Claus Schneider
2026-02-05 22:05         ` Junio C Hamano
2026-01-14  7:47   ` [PATCH v3 0/5] git-add: Skip submodules with ignore=all unless --force and explicit path used Claus Schneider via GitGitGadget
2026-01-14  7:47     ` [PATCH v3 1/5] read-cache: update add_files_to_cache take param ignored_too Claus Schneider(Eficode) via GitGitGadget
2026-01-14  7:47     ` [PATCH v3 2/5] read-cache: submodule add need --force given ignore=all configuration Claus Schneider(Eficode) via GitGitGadget
2026-01-15 15:42       ` Kristoffer Haugsbakk
2026-01-16 16:07         ` Claus Schneider
2026-01-14  7:47     ` [PATCH v3 3/5] tests: t2206-add-submodule-ignored: ignore=all and add --force tests Claus Schneider(Eficode) via GitGitGadget
2026-01-14  7:47     ` [PATCH v3 4/5] tests: fix existing tests when add an ignore=all submodule Claus Schneider(Eficode) via GitGitGadget
2026-01-14  7:47     ` Claus Schneider(Eficode) via GitGitGadget [this message]
2026-01-14 17:53       ` [PATCH v3 5/5] Documentation: update add --force option + ignore=all config Ben Knoble
2026-01-16 15:35         ` Claus Schneider
2026-02-06 13:22     ` [PATCH v4 0/5] git-add: Skip submodules with ignore=all unless --force and explicit path used Claus Schneider via GitGitGadget
2026-02-06 13:22       ` [PATCH v4 1/5] read-cache: update add_files_to_cache take param ignored_too Claus Schneider(Eficode) via GitGitGadget
2026-02-09  0:11         ` Junio C Hamano
2026-02-09  0:11         ` Junio C Hamano
2026-02-06 13:22       ` [PATCH v4 2/5] read-cache: submodule add need --force given ignore=all configuration Claus Schneider(Eficode) via GitGitGadget
2026-02-06 13:22       ` [PATCH v4 3/5] tests: t2206-add-submodule-ignored: ignore=all and add --force tests Claus Schneider(Eficode) via GitGitGadget
2026-02-06 13:22       ` [PATCH v4 4/5] tests: fix existing tests when add an ignore=all submodule Claus Schneider(Eficode) via GitGitGadget
2026-02-06 13:23       ` [PATCH v4 5/5] Documentation: update add --force option + ignore=all config Claus Schneider(Eficode) via GitGitGadget
2026-03-04 14:01         ` Kristoffer Haugsbakk
2026-03-10 21:04           ` Claus Schneider
2026-03-10 21:10             ` Claus Schneider
2026-02-20 22:27       ` [PATCH v4 0/5] git-add: Skip submodules with ignore=all unless --force and explicit path used 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

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

  git send-email \
    --in-reply-to=37fe7956e089394bb1d75f4c8af4a3347b204803.1768376879.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=avarab@gmail.com \
    --cc=bwilliams.eng@gmail.com \
    --cc=claus.schneider@eficode.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phillip.wood123@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox