git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git submodule add: Remove old docs about implicit -f

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 17, 2010, 15:53 UTC
Message-ID
<1279382025-24814-1-git-send-email-avarab@gmail.com>
In-Reply-To
<4C41C82F.8030200@web.de>

git submodule add no longer implicitly adds with --force. Remove references to the old functionality in the documentation.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
Show 7 quoted lines
> To make the behavior of "git submodule add" more consistent with "git add"
> ignored submodule paths should not be silently added when they match an
> entry in a .gitignore file. To be able to override that default behavior
> in the same way as we can do that for "git add", the new option "--force"
> is introduced.
>
> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>

You beat me to it. I like this better than the original functionality that I implemented, and it's now possible with --ignore-missing.

So,:
    Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>

This amended patch removes some obsolete documentation that you missed.

> +               echo >&2 "The following path is ignored by one of your .gitignore files:" &&
> +               echo >&2 $path &&
> +               echo >&2 "Use -f if you really want to add it."

Is the "it" intentional? We currently say "them" in git add regardless of how many things are being added, so perhaps we should say "it" there too for singulars.

I'll jot this down as something to look at for plural support once gettext gets merged.

 Documentation/git-submodule.txt |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 617069f..1ed331c 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -95,10 +95,6 @@ is the superproject and submodule repositories will be kept
 together in the same relative location, and only the
 superproject's URL needs to be provided: git-submodule will correctly
 locate the submodule using the relative URL in .gitmodules.
-+
-The submodule will be added with "git add --force <path>". I.e. git
-doesn't care if the new path is in a `gitignore`. Your invocation of
-"git submodule add" is considered enough to override it.
 
 status::
 	Show the status of the submodules. This will print the SHA-1 of the
-- 
1.7.2.rc3.125.g94e09.dirty
Previous: Jens LehmannNext: Jens Lehmann
Message 9 of 10 in “git submodule: add submodules with git add -f <path>”
  1. git submodule: add submodules with git add -f <path>Ævar Arnfjörð Bjarmason, Jul 2, 2010
  2. git submodule: add submodules with git add -f <path>Ævar Arnfjörð Bjarmason, Jul 5, 2010
  3. Junio C HamanoJul 6, 2010
  4. Jens LehmannJul 6, 2010
  5. Ævar Arnfjörð BjarmasonJul 6, 2010
  6. git add: Add the "--ignore-missing" option for the dry runJens Lehmann, Jul 9, 2010
  7. Junio C HamanoJul 12, 2010
  8. git submodule add: Require the new --force option to add ignored pathsJens Lehmann, Jul 17, 2010
  9. git submodule add: Remove old docs about implicit -fÆvar Arnfjörð Bjarmason, Jul 17, 2010
  10. Jens LehmannJul 17, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.