git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "git add -A" should respect "ignore = all" in ".gitmodules"
@ 2024-11-11  9:13 Oliver Kopp
  0 siblings, 0 replies; only message in thread
From: Oliver Kopp @ 2024-11-11  9:13 UTC (permalink / raw)
  To: git

I have a repository with "ignore = all" set in ".gitmodules"

[submodule "abbrv.jabref.org"]
  path = buildres/abbrv.jabref.org
  url = https://github.com/JabRef/abbrv.jabref.org.git
  ignore = all
  shallow = true

"git status" reports no changes

Now, I do

1. "echo test >> CHANGELOG.md"
2. "git status"
3. See that only "CHANGELOG.md" has modifications
4. "git add -A"
5. See that "CHANGELOG.md" and "buildres/abbrv.jabref.org" has modifications.

This is consistent to the documentation:

A. "ignore = all" is instructing "git status" (and git diff family)
only (https://git-scm.com/docs/gitmodules/2.10.5#Documentation/gitmodules.txt-submoduleltnamegtignore)
B. "git add -A" adds "all files in the entire working tree"
(https://git-scm.com/docs/git-add#Documentation/git-add.txt--A)

However, I think this is not consistent in itself: The files output by
"git status" should match the files being handled by "git add -A".

I am aware of the workaround to use "git update-index
--assume-unchanged path/to/submodule" for each ignore sub module.

One can try out at git@github.com:JabRef/jabref.git.

StackOverflow question on this: https://stackoverflow.com/q/66773544/873282

My wish: "git add -A" should respect "ignore = all" in ".gitmodules"

WDYT?

Cheers,

Oliver

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-11  9:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-11  9:13 "git add -A" should respect "ignore = all" in ".gitmodules" Oliver Kopp

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).