Thread (1 message) 1 message, 1 author, 2026-02-20

Re: [PATCH v4 0/5] git-add: Skip submodules with ignore=all unless --force and explicit path used

From: Junio C Hamano <hidden>
Date: 2026-02-20 22:27:46

"Claus Schneider via GitGitGadget" [off-list ref] writes:
The ignore=all configuration for submodules is currently honored by status
and diff, but not by add. This inconsistency causes friction when working
with submodules:

 * Developers unintentionally stage submodule updates, leading to conflicts
   and unnecessary changes.
 * Tracking branches in submodule configs causes friction as updates to the
   submodule SHA1 are added without intent.

This patch aligns git add with the behavior of status and diff:

 * Submodules marked ignore=all are skipped by default.
 * Attempting to add such a submodule explicitly now requires --force.

A submodule can frictionless track a branch in the configuration or manually
switched to and use update --update --remote without unintentionally add the
changes to the super-project.

Tests that previously added submodules without --force have been updated
accordingly. A new test is added to test the behavior of git add with and
without --force.
The latest round of this series has not seen any meaningful reviews.
Everybody happy with this latest round?

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help