Commit 7de63523 authored by Antonio Ospite's avatar Antonio Ospite Committed by Alberto Fanjul

Honor GIT_DIR env

parent 635a264f
Pipeline #47868 failed with stages
in 6 minutes
......@@ -446,11 +446,18 @@ public class Application : Gtk.Application
}
else
{
// Otherwise open repository from current dir
string? wd = app_command_line.get_cwd();
open(new File[] { File.new_for_path(wd) }, activity);
present_window(activity, command_lines);
unowned string git_dir_env = app_command_line.getenv("GIT_DIR");
if (git_dir_env != null)
{
File[] files = new File[] {File.new_for_path(git_dir_env)};
open_command_line(files, activity, command_lines);
} else {
// Otherwise open repository from current dir
string? wd = app_command_line.get_cwd();
open(new File[] { File.new_for_path(wd) }, activity);
present_window(activity, command_lines);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment