-
-
Notifications
You must be signed in to change notification settings - Fork 572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stashing tab shows not staged/ not tracked files in view #2263
Comments
i am confused. could you define an example case with some bash setting the files up in a way that the problem can be reproduced? |
So currently, as I understand it, it seems that these options aren't used yet for a visual representation, but are used for a functional purpose. e.g., if you toggle untracked off ( Lines 71 to 80 in 6ec7eea
gitui/asyncgit/src/sync/stash.rs Lines 100 to 125 in 6ec7eea
A couple ideas from me would be 1, we could add an identifier ( ///
pub fn update(&mut self) -> Result<()> {
if self.is_visible() {
let status_type = if self.options.keep_index { StatusType::Both } else { StatusType::WorkingDir };
let show_untracked = if self.options.stash_untracked { Some(ShowUntrackedFilesConfig::All) } else { Some(ShowUntrackedFilesConfig::No) };
self.git_status
//TODO: support options
.fetch(&StatusParams::new(status_type, show_untracked))?;
}
Ok(())
} I've made a PR with that second change at the least (without the identifier idea). |
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 pressingu
, 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
The below screenshot actually show correct behavious, as there's nothing to stash, but files are still listed in file tree view
Context (please complete the following information):
Fedora Linux 39 (Workstation Edition) x86_64
nightly 2024-06-09 ()
1.74.0-x86_64-unknown-linux-gnu
The text was updated successfully, but these errors were encountered: