Skip to content

Commit

Permalink
fix(git): force autocrlf=false. Fixes #1055
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 13, 2024
1 parent 758bb5d commit d2a4ce2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/lazy/manage/task/git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ M.clone = {

args[#args + 1] = "--origin=origin"

-- If git config --global core.autocrlf is true on a Unix/Linux system, then the git clone
-- process will lead to files with CRLF endings. Vi / vim / neovim cannot handle this.
-- Force git to clone with core.autocrlf=false.
args[#args + 1] = "-c"
args[#args + 1] = "core.autocrlf=false"

args[#args + 1] = "--progress"

if self.plugin.branch then
Expand Down

0 comments on commit d2a4ce2

Please sign in to comment.