Commit 45003c4a5da51977073e45bcc3e7343b1bcc1c96

Thomas de Grivel 2023-03-01T08:39:19

git fetch --unshallow

diff --git a/lib/rbpkg/repo.rb b/lib/rbpkg/repo.rb
index 8637c9e..b02444a 100644
--- a/lib/rbpkg/repo.rb
+++ b/lib/rbpkg/repo.rb
@@ -34,7 +34,7 @@ class Rbpkg::Repo
   def checkout(branch)
     verbose(3, "repo(#{name.inspect}).checkout")
     sh_branch=sh_quote(branch)
-    cmd! "cd #{sh_quote(src_dir!)} && git fetch #{sh_quote(remote)} #{sh_branch}"
+    cmd! "cd #{sh_quote(src_dir!)} && git fetch --unshallow"
     cmd! "cd #{sh_quote(src_dir!)} && git reset --hard"
     cmd! "cd #{sh_quote(src_dir!)} && git checkout #{sh_branch} --"
     cmd! "cd #{sh_quote(src_dir!)} && git reset --hard"
@@ -197,7 +197,7 @@ class Rbpkg::Repo
 
   def fetch
     verbose 3, "repo(#{name.inspect}).fetch"
-    cmd! "cd #{sh_quote(src_dir!)} && git fetch"
+    cmd! "cd #{sh_quote(src_dir!)} && git fetch --unshallow"
   end
 
   def git_clone