From 4b68cbbb8d7541eb786e46aa1277e9a396c4c5f4 Mon Sep 17 00:00:00 2001 From: Simon Tournier Date: Tue, 15 Apr 2025 17:57:00 +0200 Subject: [PATCH] =?UTF-8?q?git:=20Move=20=E2=80=98core.autocrlf=E2=80=99?= =?UTF-8?q?=20settings.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow up of b5e567bb2b277f89af493ba8cd0799fdb368a184. * guix/git.scm (clone*): Move ‘core.autocrlf’ settings from here... (update-cached-checkout): ...to here. Change-Id: I0f91d348376f9953cfbc497148596b738705818b Signed-off-by: Ludovic Courtès --- guix/git.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/guix/git.scm b/guix/git.scm index c1353c5c04f..517e3b8ff0a 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -228,12 +228,7 @@ make sure no empty directory is left behind." (make-clone-options #:fetch-options (make-default-fetch-options #:verify-certificate? - verify-certificate?)))) - (config (repository-config repository))) - ;; Override 'core.autocrlf' as set in ~/.gitconfig to ensure files are - ;; left unchanged when cloning and pulling. - (set-config-string config "core.autocrlf" "input") - + verify-certificate?))))) repository)) (lambda _ (false-if-exception (rmdir directory))))) @@ -592,7 +587,12 @@ current settings unchanged." (repository-open cache-directory) (clone/swh-fallback url ref cache-directory #:verify-certificate? - verify-certificate?)))) + verify-certificate?))) + (config (repository-config repository))) + ;; Override 'core.autocrlf' as set in ~/.gitconfig to ensure files are + ;; left unchanged when cloning and pulling. + (set-config-string config "core.autocrlf" "input") + ;; Only fetch remote if it has not been cloned just before. (when (and cache-exists? (not (reference-available? repository ref)))