jesseduffield.lazygit/pkg/i18n
Stefan Haller 785c8a712c Explain when a submodule has nothing stageable
A submodule that only has dirty or untracked content (no new commit) can't
be staged from the parent repo, but it still shows up as having unstaged
changes. Pressing stage on it therefore briefly flashed as staged and then
reverted, without explaining why nothing was staged.

Detect this case (via `git submodule status`, where a '+' prefix marks a
stageable commit change) in the shared stage/unstage decision: if the only
thing that looks stageable is such a submodule, don't try to stage it.
Instead unstage if there's anything staged to unstage, so the toggle stays
symmetric; otherwise show an error explaining that there's nothing to stage.

Because the decision is shared, this covers both the stage (space) and
stage-all (a) keybindings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 09:12:09 +02:00
..
translations Update translations from Crowdin 2026-05-26 22:08:49 +02:00
english.go Explain when a submodule has nothing stageable 2026-06-04 09:12:09 +02:00
i18n.go Modernize all codes 2025-11-15 10:46:23 +01:00
i18n_test.go Clear LC_* env vars when running LANG tests 2026-05-01 08:13:52 +02:00