Repository navigation
fix(garde-fous): le test des verdicts ne touche plus au vrai depot depuis un worktree - #21
Open
stephrobert wants to merge 1 commit into
Open
stephrobert wants to merge 1 commit into
stephrobert wants to merge 1 commit into
Conversation
…puis un worktree Lance par le hook de commit, test_verdicts_et_commun_separes.py heritait de GIT_DIR et GIT_INDEX_FILE. Dans un worktree ces chemins sont absolus : le depot jetable du test ecrivait core.bare=true et l'identite de test dans la configuration du vrai depot, et remplacait l'index du worktree. Constate le 2026-10-31. L'assistant _git retire desormais les variables GIT_* de son environnement.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ce que corrige cette PR
Le garde-fou des verdicts (
tests/test_verdicts_et_commun_separes.py) crée un dépôt git jetable pour éprouver l'outil. Lancé par le hook de commit, il héritait deGIT_DIRet deGIT_INDEX_FILE.Dans un checkout ordinaire, ces chemins sont relatifs et retombent sans dommage dans le dossier temporaire. Dans un worktree, ils sont absolus et visent le vrai dépôt. Constaté le 2026-10-31 sur publier-service-dsoxlab-training, lors d'un commit depuis un worktree :
core.bare=trueet l'identité de testBanc <[email protected]>: tout commit suivant aurait été signé « Banc » ;L'assistant
_env_sans_git()retire les variablesGIT_*de l'environnement de chaque appel à git et à l'outil. Le correctif a été éprouvé depuis un worktree : tous les hooks passent, et la configuration du dépôt reste intacte (core.bare=false, aucune identité locale).Le fichier est identique dans dix-sept catalogues ; la même correction leur est appliquée.