Review context trims the first column of git status --short
I maintainer di solito rispondono entro 7 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 86/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- git, javascript
- Ambito
- tooling
Direzione di ricerca
Leggi in plugins/codex/scripts/lib/git.mjs la parte attorno a collectWorkingTreeContext e formatSection, poi cerca i test per il contesto di revisione inline e lightweight. Riproduci lo stato misto delle modifiche in staging e non in staging descritto nell’issue e verifica che M a.js rimanga nella sezione Git Status. Conferma inoltre che una sezione vuota continui a mostrare (none).
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
collectWorkingTreeContext in plugins/codex/scripts/lib/git.mjs trims the git status --short output:
const status = gitChecked(cwd, ["status", "--short", "--untracked-files=all"]).stdout.trim();
formatSection then trims it again:
return [`## ${title}`, "", body.trim() ? body.trim() : "(none)", ""].join("\n");
In the short format, the first column is the staged state and the second column is the unstaged state. When the first line is an unstaged change, the trim removes its leading space, and the line now says the change is staged.
Example
Commit a.js and b.js, change both, and stage only b.js:
git status --short: " M a.js\nM b.js\n"
review context: "M a.js\nM b.js"
Codex reads a.js as staged, not unstaged. This happens in the inline and the lightweight context.
Suggested fix
Keep the leading white space and remove only the trailing new lines:
const status = gitChecked(cwd, ["status", "--short", "--untracked-files=all"]).stdout.trimEnd();
return [`## ${title}`, "", body.trim() ? body.trimEnd() : "(none)", ""].join("\n");
A test with an unstaged change in the first status line that checks for M a.js in the Git Status section, and a test that an empty section still shows (none), would cover it.
Found at db52e28f4d9ded852ab3942cea316258ae4ef346 (v1.0.6). The lines are the same on main.
- Lingua principale
- JavaScript
- Stelle
- 34.4k
- Fork
- 2.4k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 openai/codex-plugin-cc
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
openai/codex-plugin-cc#824 ·
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
openai/codex-plugin-cc#823 ·
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
openai/codex-plugin-cc#819 ·
I maintainer di solito rispondono entro 7 giorni
-
codex-rescue: pinned `model: sonnet` triggers "restricted by your organization" fallbackForse già presa @jcpoyser l’ha presa 20 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
openai/codex-plugin-cc#804 ·
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
openai/codex-plugin-cc#798 ·
I maintainer di solito rispondono entro 7 giorni
Tutte le issue di openai/codex-plugin-cc
Issue simili
-
Plaid sync fails and rolls back when a removed pending transaction was matched by a bank ruleAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bigcapitalhq/bigcapital#1544 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
help wanted kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
meshery/meshery.io#3112 ·
I maintainer di solito rispondono entro 2 giorni
-
area:docs type:chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
bulkhead-labs/tailsuite#31 ·
-
dependencies javascript
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
gems-uff/noworkflow#470 ·
I maintainer di solito rispondono entro 3 giorni
-
product / auth product / console product / sites product / storage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno