GitUI shows working-tree changes in cross-linked bare repos where Git reports no work tree
- 主要言語
- Rust
- スター
- 22.5k
- フォーク
- 774
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
**Describe the bug**
In a mutual bare-repo reference setup, `gitui` shows working-tree file changes while Git CLI reports there is no work tree.
Example mismatch:
- `git status` in `/i4/repo0` returns: `fatal: this operation must be run in a work tree`
- `gitui` in `/i4/repo0` still shows many unstaged entries (`HEAD`, `config`, `hooks/`, etc.)
This is misleading because the repo is not in a valid work-tree state for normal file status operations.
**To Reproduce**
Steps to reproduce the behavior:
1. Create two repos at fixed reproducible paths:
```bash
mkdir -p /i4/repo0 /i4/repo1
```
2. Initialize and cross-link git directories:
```bash
cd /i4/repo0
git init --bare
git init --separate-git-dir=../repo1
cd /i4/repo1
git init --bare
git init --separate-git-dir=../repo0
```
3. Verify CLI behavior in `/i4/repo0`:
```bash
cd /i4/repo0
git status
```
Expected CLI output:
```text
fatal: this operation must be run in a work tree
```
4. Run `gitui` in the same path:
```bash
cd /i4/repo0
gitui
```
5. Observe that `gitui` still lists unstaged/untracked files.When Git reports no work tree, `gitui` should not show normal working-tree file changes. It should present an error/state consistent with Git CLI.
コントリビューションガイド
調査の方向性
一覧にある相互リンクされた bare リポジトリの再現手順を実行し、`git status` と `gitui` に表示される変更を比較します。working tree と status の処理を追跡し、その後、この無効な状態で通常の working-tree エントリが表示されず、Git のエラー動作との一貫性が保たれることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, rust
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 55/100