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::openbygix::discoverfixes this issue.gix::openerrors when the passed directory is not a git repository,gix::discoversearches parent directories for a git repository. The code causing the crash has not been released yet, so no changelog entry is necessary.