You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've always thought it would be handy to have the possibility to filter list of files by its name/path. Something like:
(yeah, I have some colors in git-gui.sh tweaked as a home-made attempt at dark mode GUI...)
This could filter both in "Unstaged changes" and also in "Staged changes" lists at the same time.
It could also support naive and simple wildcarding (a single * meaning "one or more of any characters", i.e. regex .+).
E.g. my_dir_a*my_dir_b would keep both of these:
my_dir_in_repo/my_dir_a/whatever/my_dir_b/yay.php
my_dir_in_repo/my_dir_a_merged_with_my_dir_b
It could also support case-insensitive filtering.
As a bonus, something similar would be handy in a form of "filter files by text search in diff". E.g. I could easily find all files where I renamed my_function_a to my_function_b and make a commit only from those files, even if I have hundreds of other changed files.
The text was updated successfully, but these errors were encountered:
If such a filter exists and not all files are listed, then an outstanding indication must be visible that indicates the fact. Otherwise, it would be all too easy to stage just part of the changed files.
Thinking a bit more on it:
IMO, the list of staged files must not be filtered: It must be clear at all times what is about to be committed.
Is it really the case that a filter is needed? Wouldn't it be sufficient to just search the list and have it scroll to a particular file? Or highlight the files matching a pattern without removing the others?
Or highlight the files matching a pattern without removing the others?
This might also do it :)
My use case is that I'm having hundreds of files changed (like a massive refactoring), but for "good development process reasons" I'd like to separate all of these changes into logically standalone commits. I also know how to identify the files I'd like to have in the soon-to-be-commit (either by specific filename/part-of-path or by specific text in line diff), but I'm currently not able to distinguish them in the list of unstaged files.
The use case for having the "filter" (or highlights, as you suggest) applied in the list of staged files is the ability to undo the staging of some "accidentally" staged files during the process (e.g. the staged file XYZ doesn't match what the commit will be about, so it shouldn't be there and I want to unstage it).
All-in-all, both of your points are good points - and if there's no filtering but merely highlighting, IMHO, it also solves both of the points.
Hi, I've always thought it would be handy to have the possibility to filter list of files by its name/path. Something like:
(yeah, I have some colors in
git-gui.sh
tweaked as a home-made attempt at dark mode GUI...)*
meaning "one or more of any characters", i.e. regex.+
).my_dir_a*my_dir_b
would keep both of these:my_dir_in_repo/my_dir_a/whatever/my_dir_b/yay.php
my_dir_in_repo/my_dir_a_merged_with_my_dir_b
As a bonus, something similar would be handy in a form of "filter files by text search in diff". E.g. I could easily find all files where I renamed
my_function_a
tomy_function_b
and make a commit only from those files, even if I have hundreds of other changed files.The text was updated successfully, but these errors were encountered: