fix: --unshallow errors if the repo is already unshallow

instead we use --depth=2147483647 because as noted by the docs...

  The special depth 2147483647 (or 0x7fffffff, the largest positive number a
  signed 32-bit integer can contain) means infinite depth.

  https://git-scm.com/docs/shallow
This commit is contained in:
2024-11-19 12:41:54 -06:00
parent 25372aea36
commit 6259250120

View File

@ -62,7 +62,7 @@ function proc.git_reset(dir, treeish, cb)
end
function proc.git_checkout(dir, branch, commit, cb)
local args = { "fetch", "--unshallow", "origin", branch }
local args = { "fetch", "--depth=2147483647", "origin", branch }
proc.exec("git", args, dir, git_env, function(err, message)
cb(err, message)