mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
git: Override the user’s ‘core.autocrlf’ settings.
Fixes <https://issues.guix.gnu.org/77214>. Fixes a bug whereby setting ‘core.autocrlf’ to ‘true’ in ~/.gitconfig would lead ‘guix pull’ & co. to obtain non-bit-identical files, including possibly syntactically-invalid Scheme files. * guix/git.scm (clone*): Set ‘core.autocrlf’ to ‘input’. Reported-by: Jodi Jodingtonstinski <jodijodingtondev@gmail.com> Change-Id: I11fb20813a9fc1e14828ca8ebf5092c4b1181e5c
This commit is contained in:
parent
0502a30d31
commit
b5e567bb2b
1 changed files with 13 additions and 5 deletions
18
guix/git.scm
18
guix/git.scm
|
@ -1,6 +1,6 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
;;; Copyright © 2018-2024 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2018-2025 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2021 Kyle Meyer <kyle@kyleam.com>
|
||||
;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
|
||||
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
|
||||
|
@ -236,10 +236,18 @@ make sure no empty directory is left behind."
|
|||
(lambda ()
|
||||
(mkdir-p directory)
|
||||
|
||||
(clone url directory
|
||||
(make-clone-options
|
||||
#:fetch-options (make-default-fetch-options
|
||||
#:verify-certificate? verify-certificate?))))
|
||||
(let* ((repository
|
||||
(clone url directory
|
||||
(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")
|
||||
|
||||
repository))
|
||||
(lambda _
|
||||
(false-if-exception (rmdir directory)))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue