From 27242629e47789faab48754bd6c204222acfbc5c Mon Sep 17 00:00:00 2001 From: tramasys <29458406+tramasys@users.noreply.github.com> Date: Thu, 13 Aug 2026 00:28:10 +0200 Subject: [PATCH] Respect GIT_DIR when opening repository --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 45b4f7d..23821fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -314,10 +314,10 @@ fn from_args() -> Result<(), String> { } } - let dot = ".".to_string(); - let path = matches.get_one::("path").unwrap_or(&dot); - - let repository = get_repo(path, false); + let repository = match matches.get_one::("path") { + Some(path) => get_repo(path, false), + None => Repository::open_from_env(), + }; if let Some(matches) = matches.subcommand_matches("model") { match repository {