-
-
Notifications
You must be signed in to change notification settings - Fork 573
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
Fix log crashing in subdirectories #2301
Fix log crashing in subdirectories #2301
Conversation
Replace `gix::open` by `gix::discover`. `gix::open` errors when the passed directory is not a git repository.
@cruessler can you add a teest for that so we don't regress on this again? |
@cruessler we also need to make sure it does respect the env vars, see #2298 |
@extrawurst I just added a test for running I’ll have a look at environment variables next. |
@cruessler please make a followup with a test for the env, this broke in the past and it would be good to know when it does :) |
Will do, I put it on my todo list. :-) |
@extrawurst I would really like to write an integration test for env variables, similar to what I’ve tried in #2368. That way, we ideally would have a test that read like “set env variable, start app, expect screenshot showing the loaded app to look like snapshot”. I will also try adding a test to |
Sounds great! |
When opened in a sub-directory of a git repository, the log view crashes. Replacing
gix::open
bygix::discover
fixes this issue.gix::open
errors when the passed directory is not a git repository,gix::discover
searches parent directories for a git repository. The code causing the crash has not been released yet, so no changelog entry is necessary.