feat: org ディレクトリの複数リポジトリを横断して扱う WorkPane#30
Merged
Conversation
作業ディレクトリがリポジトリでない(org ディレクトリ等)場合、配下の git リポジトリを検出し、変更ファイル/Diff/履歴を横断して扱えるようにした。 - GitEngine.discoverRepos(under:) を追加(.git を持つ子孫を列挙、リポには降りない) - WorkPaneModel を複数リポ対応に: 変更ファイルをリポジトリごとに集計(複数時は repoName をトップ階層にしてツリー表示)、Diff/全文は各ファイルの repoRoot 基準、 履歴/ブランチは対象リポジトリを選択(履歴ペインにリポジトリセレクタ) - 単一リポは従来どおりの表示 - discoverRepos の単体テストを追加 Refs #(org ディレクトリ対応の中核 B)
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.
概要
「org ディレクトリでエージェントを実行しても、リポジトリを上手く扱うビュー」の中核。作業ディレクトリが単一リポジトリでない(複数リポを含む org ディレクトリ)場合に、配下の git リポジトリを検出し、変更ファイル・Diff・履歴を横断して扱えるようにした。
内容
GitEngine.discoverRepos(under:):.gitを持つ子孫を列挙(リポジトリの中へは降りない、最大3段)。作業ディレクトリ自身がリポならそれ1つ。WorkPaneModelを複数リポ対応:repoNameをトップ階層にしてツリー表示(repoA/ repoB/ …)。件数は全リポ合計。確認(実機)
/tmp/test-org(repoA・repoB を含む非リポ)をセッションにすると、変更ファイルが repoA / repoB セクションに分かれ、「4 変更」集計、履歴ペインにリポセレクタ(repoA 選択で repoA の履歴)が出ることを確認(スクショ)。swift testに discoverRepos の単体テストを追加、緑。xcodebuild成功。補足(follow-up)