Conversation
設定ファイルが持っていた 2 項目は設定である必要が無くなった: - problems_dir は problems/ に固定 (workflow のトリガーも元から固定だった) - base_url は本番固定 (単一サーバ方針の帰結) ルートは上に辿って見つけた .git のある場所 (worktree の .git ファイルも可)。 Git 管理外ではカレントディレクトリをルートとして扱い、その旨を表示する。 これで pull を最初の 1 コマンドとして使え、「リポジトリの初期化」という 概念が消える。workflow から problems_dir を sed で読む処理も削除。 あわせて display_path を .. 込みの相対パスに対応させた。サブディレクトリ から実行したとき、ルート側のパスが絶対パスで表示されていた。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Windows 形式 (バックスラッシュ・ドライブ文字) の直書きは Linux では区切りに ならず、CI で落ちた。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
変更内容
設定ファイルが持っていた 2 項目は、もはや設定である必要がありませんでした。
problems_dir→problems/に固定 (workflow のトリガーは元からproblems/**をハードコードしており、「設定を変えたら workflow も直すこと」という歪みも一緒に消えます)base_url→ 本番固定 (単一サーバ方針の帰結)ルートの決め方は「上に辿って見つけた
.gitのある場所、無ければカレントディレクトリ (その旨を表示)」です。worktree / submodule の.gitファイルにも対応しています。pullを最初の 1 コマンドとしてどこでも使えるようになり、「リポジトリの初期化」という概念が消えました (newは骨組み作成と--dirのためのコマンドに)problems_dirを sed で読む処理・yukicoder.tomlのパストリガーを削除yukicoder.tomlも削除display_pathが..込みの相対パスを組めるようにしました。サブディレクトリから実行したとき、ルート側のパスが絶対パスで表示される潜在バグがあった (絶対パスを出さない方針に反する) ためですこのブランチは PR #9 (init の new への統合) の上に積んであります。これだけマージすれば #8・#9 の分も入ります。
実測
problems/13954/の中からpull 13954→.gitからルートを特定し、表示は./statement.md(絶対パスなし)new 13954→ ルート直下のproblems/13954/に作成、表示は../problems/13954形式pull 13954→ 「カレントディレクトリをルートとして扱います (.git が見つかりません)」を表示して動作単体テスト 54 件 (.git 探索・相対パス表示の回帰テストを含む)、clippy
-D warnings/ fmt 通過。🤖 Generated with Claude Code
https://claude.ai/code/session_01GDSDbQcqbZqhXQ1dVo9BeE