Changes inside git submodules are not shown, only the "Subproject commit" pointer
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 64/100
Direzione di ricerca
Inizia tracciando come git diff --name-status alimenta l’elenco dei file e come detect-ref.sh avvia le revisioni del working tree. Confronta il percorso esistente --stdin con il caricamento per file e l’integrazione con l’editor, quindi verifica il comportamento delle voci gitlink nelle modalità working tree e ref. Il lavoro è completato quando le modifiche ai sottomoduli compaiono nei rispettivi percorsi con prefisso, senza modificare il comportamento dei repository privi di sottomoduli.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
I work in a meta-repo: the root has no code of its own, just 11 git submodules
(one per service). All real changes happen inside the submodules.
When I run revdiff at the root, or when the Claude Code plugin launches it there
(detect-ref.sh sees uncommitted changes and starts a working-tree review), the
tree lists each submodule as one entry and the diff pane shows only this:
- Subproject commit e4347a2ade4e6be9f80f9b639a92cec6a2e65548
+ Subproject commit 8b9959542690ad9ddf75cdc4f0963779d8b810e0-dirty
There is nothing to annotate, so the review silently covers none of the actual
changes. That is the part that bites: revdiff looks like it worked, the agent
thinks the review happened, and not a single changed line was on screen.
Piping a hand-built diff into revdiff --stdin works around it, but the plugin
flow cannot know to do that: the launcher runs revdiff in the current directory
and has no way to tell that the diff it got is only gitlink pointers.
revdiff v1.12.0, git 2.55.0, macOS.
Where it comes from
revdiff builds the file list from git diff --name-status, and git never expands
submodules there, not even with --submodule=diff. So each submodule is one
160000-mode entry and the per-file diff for it is the one-line pointer change.
Proposed solution
When a --name-status entry is a gitlink, run git inside that submodule and add
the resulting files to the tree with the submodule path as prefix. The base
follows what git diff --submodule=diff already does: pinned SHA against the
submodule's working tree in working-tree mode, the two gitlink SHAs in ref mode.
The existing per-file loading and editor integration keep working unchanged.
Opt-in behind a flag, --recurse-submodules to match git's own naming for the
same behaviour, so nothing changes for repos without submodules.
If you would rather keep the core as is, a smaller option is to teach the
launcher script to notice a gitlink-only diff and fall back to piping a
per-submodule diff into revdiff --stdin. Something like
git submodule foreach --quiet 'git diff --src-prefix=a/$sm_path/ --dst-prefix=b/$sm_path/'
already produces root-relative paths that the stdin parser handles as is.
Happy to do either, or to hear that this is out of scope.
- Lingua principale
- Go
- Stelle
- 896
- Fork
- 92
- Merge medio
- 17h 49m
- PR unite (30g)
- 17
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di umputun/revdiff
-
Support horizontal scrollAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
umputun/revdiff#334 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
umputun/revdiff#369 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
umputun/revdiff#341 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
umputun/revdiff#331 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 64/100
umputun/revdiff#324 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di umputun/revdiff
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
NVIDIA/k8s-device-plugin#2076 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
area/release kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
kubernetes-sigs/kueue#16455 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno