gitui-org / gitui-org/gitui

Stashing tab shows not staged/ not tracked files in view

オープン
#2,263 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Rust
スター
22.5k
フォーク
773
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi,

I'm not sure it's even a bug.

When I was doing stashing in Stash[4] tab, you can switch what to stash by toggling staged/untracked files with keys `i/u` respectively.

At first I thought it's noop, since there was no visual indication or cue that anything changed. It works as it should by omitting untracked or staged files when toggling with respective keys.

I figured out that it behaves correctly without any obvious clue only by accident.
I had a single untracked directory with different user. The directory had `root` user and I couldn't stash it cause of permissions. Than the window popped up showing when I was attempting to stash with stashing configuration `{StashUntracked: true, ...}`. When pressing `u`, the config changed and I could stash only tracked files as expected.

**To Reproduce**
Create staged or untracked files with elevated permission like `root` in project folder. Notice error, than press u or i and see it stashes as expected.

**Expected behavior**
I expect to have visual cue for what will be stashed. It should be reflected in the file tree view upon pressing `i/u` keys.

**Screenshots**
![Screenshot from 2024-06-10 11-21-16](https://github.com/extrawurst/gitui/assets/44980578/ccdf22f9-3395-4fbb-8a33-2228a491d6a5)
The below screenshot actually show correct behavious, as there's nothing to stash, but files are still listed in file tree view
![Screenshot from 2024-06-10 11-21-30](https://github.com/extrawurst/gitui/assets/44980578/97d6192b-8532-4101-adad-dfdfcfdd0d69)

**Context (please complete the following information):**
- OS/Distro + Version: `Fedora Linux 39 (Workstation Edition) x86_64`
- GitUI Version `nightly 2024-06-09 ()`
- Rust version: `1.74.0-x86_64-unknown-linux-gnu`

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start by reproducing the behavior in gitui's Stash tab with staged and untracked files, then trace the i/u key handling and the file tree view. Done means the tree visibly indicates which staged or untracked files will be included after either toggle, while the existing stashing behavior remains correct.

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

評価

技術スタック
git, rust
領域
cli, devtools
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

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

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