From 94fa4fa471161b2ec8c0a1998640becd7e28f9c5 Mon Sep 17 00:00:00 2001 From: AniketBajaj2024 Date: Sat, 12 Sep 2026 15:01:23 +0530 Subject: [PATCH] Extract git depth argument constant Replace hardcoded '--depth' with GIT_DEPTH_ARG constant. --- installer/src-tauri/src/installer.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/installer/src-tauri/src/installer.rs b/installer/src-tauri/src/installer.rs index 5af9001c11..157324de59 100644 --- a/installer/src-tauri/src/installer.rs +++ b/installer/src-tauri/src/installer.rs @@ -8,6 +8,7 @@ use std::thread; const DEFAULT_REPO_URL: &str = "https://github.com/Osmantic/ODS.git"; const DEFAULT_INSTALL_REF: &str = "main"; +const GIT_DEPTH_ARG: &str = "--depth"; const TRANSFERRED_REPO_URL_BYTES: &[u8] = &[ 104, 116, 116, 112, 115, 58, 47, 47, 103, 105, 116, 104, 117, 98, 46, 99, 111, 109, 47, 76, 105, 103, 104, 116, 45, 72, 101, 97, 114, 116, 45, 76, 97, 98, 115, 47, 79, 68, 83, 46, 103, @@ -195,7 +196,7 @@ fn ensure_checkout(install_dir: &Path) -> Result<(), String> { let clone = Command::new("git") .args([ "clone", - "--depth", + GIT_DEPTH_ARG, "1", "--branch", install_ref(),