Bug 577252 - Allow "stash" for individual files/folders selection
Summary: Allow "stash" for individual files/folders selection
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-15 01:44 EST by Christoph Laeubrich CLA
Modified: 2021-11-15 03:47 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Laeubrich CLA 2021-11-15 01:44:30 EST
Currently I need to select the top-level project to perform a stash, If I select a folder or file of a project it is not shown.
Given that I also can't stash from the git staging view it is a bit inconvenient as one has to scroll up, maybe collapse things to get the right place for performing a stash.

Maybe "stash" could even be a button in the staging view? I'm working most of the time with that view anyways.
Comment 1 Christoph Laeubrich CLA 2021-11-15 01:45:10 EST
Sorry wrong project ...
Comment 2 Thomas Wolf CLA 2021-11-15 03:32:50 EST
Also needs support in JGit's StashCommand first. Once we have that, we can think about how to provide a UI for it.

Note that stashing distinguishes between stashing untracked changes, tracked but unstaged changes, and staged changes. A tracked file can have both staged and unstaged changes. Whatever we'd do in the staging view to provide a "partial stage" command would have to take account of that. (If the user selects a file in the unstaged viewer and invokes the stash command, should that also stash the not selected staged version? Probably not. If the user selects the file in both viewers, it should, but then it has to take into account the selection of a non-focused viewer, which is a bit special.) A command in the context menu of selected files/folders should probably stash both staged and unstaged changes (and also untracked files, if selected).
Comment 3 Christoph Laeubrich CLA 2021-11-15 03:47:41 EST
I think it would even be helpful to simply bring up the stage dialog (without individual files) that currently pops up if I select a repo/project.

Staging single files would be great of course also. Some of these could of course be accomplished on the command line as well, but I really love to not leave the UI and even sometimes (windows) there is even no git-client installed to do commandline actions.

For single-file I think its always ok to select the file and rightclick it.