Skip to content
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

Support using gitui with yadm #752

Closed
IndianBoy42 opened this issue May 30, 2021 · 11 comments · Fixed by #753
Closed

Support using gitui with yadm #752

IndianBoy42 opened this issue May 30, 2021 · 11 comments · Fixed by #753
Milestone

Comments

@IndianBoy42
Copy link

IndianBoy42 commented May 30, 2021

Is your feature request related to a problem? Please describe.
This is half a feature request and half a bug.
I use YADM for managing my dotfiles, which essentially creates a bare git repo in the $HOME directory.
YADM adds a configuration option so when I do yadm status it doesnt try show all the untracked files.

https://git-scm.com/docs/git-status#Documentation/git-status.txt---untracked-filesltmodegt

On the other hand when I try to use gitui (using gitui -d ~/.config/yadm/repo.git),
it gets stuck 'forever' probably trying to find/enumerate all the untracked files.
(Sublime Merge also seems to have this problem, but for example verco doesn't)

I suspect similar problems would happen in large repositories with large amounts of changed/untracked files

Describe the solution you'd like
I see a few ways this could be fixed

  1. check for the status.showUntrackedFiles config option and dont spend time trying to list untracked files/directories
  2. add a no-untracked flag to do something similar to above
  3. detect when there are alot of untracked files and stop trying to find more than is visible in the window
    • find the rest on-demand
  4. somehow make gitui still/more responsive while finding/rendering the untracked files anyway
  5. ETA: there is also the gui.displayuntracked which is more directly related to GUIs and untracked files, it would be a good idea to look at this option too

Describe alternatives you've considered
Unfortunately gitui is not really usable with YADM

@extrawurst
Copy link
Owner

Probably related to #100 (comment)

@extrawurst
Copy link
Owner

@IndianBoy42 gitui does not support bare repos and exits right away when you try to open it in one. so I am wondering why it even hangs for you. it should print out:

invalid git path
please run gitui inside of a valid git (non-bare) repository

please run gitui again with the -l option to create logging into a log file and share the content

@IndianBoy42
Copy link
Author

IndianBoy42 commented May 30, 2021 via email

@IndianBoy42
Copy link
Author

https://pastebin.com/90pjLcTF

from running gitui -d ~/.config/yadm/repo.git -l

that path is the location of all the git information for the git repository created by yadm

@extrawurst
Copy link
Owner

https://pastebin.com/90pjLcTF

from running gitui -d ~/.config/yadm/repo.git -l

that path is the location of all the git information for the git repository created by yadm

the log does not indicate any problem

@IndianBoy42
Copy link
Author

IndianBoy42 commented May 30, 2021 via email

@extrawurst
Copy link
Owner

Well gitui isn't crashing or anything, it just freezes on startup trying to find all untracked files (which for repositories like this shouldn't even be shown) I've discovered if i wait 30 seconds it completes and shows all untracked files, and then briefly freezes every few seconds (updating status?) I just think it would be a good idea to check the git config variables about whether untracked files should be visible Get Outlook for Androidhttps://aka.ms/AAb9ysg

I can cook up a test in a branch, can you build from source to test this then?

@IndianBoy42
Copy link
Author

IndianBoy42 commented May 30, 2021 via email

@extrawurst
Copy link
Owner

extrawurst commented May 30, 2021

I'd be glad to. I'm in a different time zone so I'm going to sleep, I can work on this tomorrow Get Outlook for Androidhttps://aka.ms/AAb9ysg

just pushed to status-without-untracked (it simply hardcodes to not show the status with untracked files to validate that this is the problem).

also reference: https://git-scm.com/docs/git-config#Documentation/git-config.txt-statusshowUntrackedFiles

@IndianBoy42
Copy link
Author

The hardcoded hiding of untracked works, the files are not shown and startup is snappy again. I added a similar change in the Stashing tab

For my own use, I have added code in my fork that checks the git config flags I mentioned before, as well as adding a --hide-untracked flag on the cli. I don't know if it fits your coding style, there weren't any CLI flags that had to be passed down to the widgets before, we may want to pass these flags around as a single object, but for now I just added boolean flags where necessary

https://github.com/IndianBoy42/gitui/tree/status-without-untracked

@extrawurst
Copy link
Owner

@IndianBoy42 please give #753 a go to verify that all works as expected then we can merge this into master

@extrawurst extrawurst added this to the v0.16.1 milestone Jun 6, 2021
@extrawurst extrawurst mentioned this issue Dec 1, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants