Flag --file not working on sub directories
まだ誰も着手していません。
- 主要言語
- Rust
- スター
- 22.5k
- フォーク
- 774
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Describe the bug
--file only works when gitui is started from the repository root.
If gitui is launched from a subdirectory inside the same repository, the file is not resolved correctly, regardless of whether the path is passed relative to the current directory or relative to the repository root.
To Reproduce
Steps to reproduce the behavior:
- Assume a repository with this file:
frontend/src/index.html
- From the repository root, run:
gitui --file frontend/src/index.html
- Observe that GitUI opens the Files tab and selects the file correctly.
- Move into a subdirectory, for example:
cd frontend
- Run:
gitui --file src/index.html
- Run:
gitui --file frontend/src/index.html
- Observe that neither command selects the file correctly.
Expected behavior
--file should work from any directory inside the Git repository, not only from the repository root.
Context (please complete the following information):
- OS/Distro + Version:
Ubuntu 14 on WSL2 - GitUI Version:
gitui nightly 2026-03-11 () - Rust version:
cargo 1.89.0
Additional context
This looks like a path resolution issue when the current working directory is not the repository root.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、CLI エントリポイントからパス解決まで --file 引数を追跡し、その後、リポジトリのルートと frontend からコマンドを再現します。GitUI をサブディレクトリから起動したときに、リポジトリ相対パスとカレントディレクトリ相対パスのどちらでも frontend/src/index.html が選択されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, rust
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100