Git checks: skip every global option before the subcommand, not just one `-C`

オープン
#22 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
git, python

調査の方向性

Start in tests/test_redteam.py and find the existing Git-check guard covered for add, commit, and push. Locate the implementation that parses the subcommand and working directory, then update it to skip Git global options and resolve repeated -C and --work-tree correctly. Add the blocked and allowed regression cases named in the issue, using fake paths only, and run that test file.

索引モデルが issue の本文から書いたものです。

説明

enhancement

The Git checks on add, commit and push only run when the subcommand comes straight after git (or, once #19 is merged, after one -C <dir>). Any other global option before the subcommand skips them:

  • git -c core.autocrlf=false add -A
  • git -C a -C b add -A (git applies each -C in turn)
  • git --no-pager -C dir add -A
  • git --git-dir=dir/.git --work-tree=dir add -A

Done when

  • The guard walks past git's global options and finds the subcommand and the folder git will act on:
    • repeated -C resolve relative to each other
    • --work-tree sets the folder
    • -c, --no-pager and similar are skipped
  • Regression tests in tests/test_redteam.py cover a blocked and an allowed case for each, with fake values only.

Found while reviewing #19.


Generated by Claude Code

主要言語
Python
スター
1
フォーク
1
平均マージ
2時間 28分
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

JTHCode/secretguard のほかの issue

JTHCode/secretguard の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。