-
Notifications
You must be signed in to change notification settings - Fork 95
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
[Feature Request] Not to show files listed in .git/info/exclude
#180
Comments
Hi! I think it already does this. Could you provide some steps to reproduce the problem? gitu on altsem/value-arguments ❯ cat .git/info/exclude
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
invisible.txt gitu on altsem/value-arguments ❯ git status
On branch altsem/value-arguments
Your branch is up to date with 'origin/altsem/value-arguments'.
nothing to commit, working tree clean gitu on altsem/value-arguments ❯ touch visible.txt invisible.txt
gitu on altsem/value-arguments [?] ❯ git status
On branch altsem/value-arguments
Your branch is up to date with 'origin/altsem/value-arguments'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
visible.txt
nothing added to commit but untracked files present (use "git add" to track)
And in gitu:
|
Sorry for the late reply! Quite busy these days.
I didn't notice it, sorry for the inconvenience. However, there is an issue of lagging when starting out.mp4Take my dotfiles repo for an example, there is ~150 modified files, and ~40 untracked files, Starting Lazygit is fast, but when it comes to gitu, have to wait for 1~2s. As you can see, there is about 100 lines of exclude in my |
@chenrry666 No worries! Hmmm. I tried just creating a bunch of random files and listing them doesn't seem to take too long time. It's hard to tell from the video, but I'm guessing that filtering actually does fail. Gitu is using libgit2 to retrieve the status. I found this open issue about the .gitignore (could be related?): libgit2/libgit2#6250 It'd be interesting to know more about your dotfiles setup. |
I am using Arch Linux. The dotfiles repo isn't bare repo, so it is using worktree. The files are correctly ignored, sorry I didn't mention that. The issue is that the lagging before the TUI being drawn may relate to some performance issues. Maybe the filtering process causes the lagging, IMO. |
Alright. It could be like you say. And the code is indeed not quite optimized and will try render everything (even though they're not shown). How many files is it? I think |
I couldn't reach my laptop in two weeks at the moment. 🫠 It was sent for repair just this afternoon. Hence I could't provide more details in a short time. I do remember there is more than 40k files in my |
Luckily I am able to come back. Here are the results: ❯ git status --porcelain | wc -l
70
❯ find . -type f |wc -l
163871 Much files here 😰 but git has correctly ignored it. |
Just as the title, maybe gitu could respect
.git/info/exclude
and not to show them in the file tree. Since I'm trying to use gitu to manage my dotfiles, listing every file in$HOME
is not a good choice: have to wait for a couple of seconds that gitu could respond to user input.Lazygit has this feature, but it seems to use the
git
command directly under the hood (I haven't read its code though.), so it might not be a proper reference.The text was updated successfully, but these errors were encountered: