jonashaag / klaus

docker run klaus / pip install klaus — the first Git web viewer that Just Works™.
http://klausdemo.lophus.org
Other
685 stars 101 forks source link

Handling invalid git repository and hidden folder #240

Closed guhetier closed 5 years ago

guhetier commented 5 years ago

This avoid getting an error 500 on an invalid git repository, as discussed in #176 and #231.

The index page with invalid repos look like this: 2019-06-11-185356_530x466_scrot

I am terrible at designing things, so advice to improve the display of invalid repositories are welcome!

jelmer commented 5 years ago

FWIW the code looks reasonable to me; the tests all pass except for python 3.7 (fixed in master).

jonashaag commented 5 years ago

@xNephe you still working on this?

guhetier commented 5 years ago

I didn't find time to work on it in the last weeks, I have been pretty busy, but I haven't forgot it. I hope to find some time by the end of the week.

guhetier commented 5 years ago

I eventually found some time to fix the PR:

jonashaag commented 5 years ago

Thanks a lot! Merged with a few minor changes in ee9d78044040b8bd9090b774838a9f6684941f2d and 7f3f5b49990076c0c0e5338a31a523a70c92b750

guhetier commented 5 years ago

Thanks! However, I noticed you added a function is_hidden_folder that end up not being used, because of the switch from listdir to glob.glob. We may want to delete it?

jonashaag commented 5 years ago

Oops thanks!

rotsix commented 4 years ago

Hey, is there a way to hide those invalid repositories?