Skip to content

Commit

Permalink
Disable shallow clone by default except for opam repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate committed Aug 8, 2024
1 parent 6effccc commit a4396f1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/repository/opamGit.ml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module VCS : OpamVCS.VCS = struct
| Some h -> "refs/remotes/opam-ref-"^h
| None -> "refs/remotes/opam-ref"

let fetch ?(full_fetch = false) ?cache_dir ?subpath repo_root repo_url =
let fetch ?(full_fetch = true) ?cache_dir ?subpath repo_root repo_url =
(match subpath with
| Some sp ->
git repo_root [ "config"; "--local"; "core.sparseCheckout"; "true" ]
Expand Down
4 changes: 2 additions & 2 deletions src/repository/opamRepository.mli
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ val pull_shared_tree:
url list -> string download OpamProcess.job

(* Same as [pull_shared_tree], but for a unique label/dirname.
If [full_fetch] is true, VCS repository is retrieved with full history (by
default, no history). *)
If [full_fetch] is set to false, VCS repository is retrieved with shallow
history (by default, full history). *)
val pull_tree:
string -> ?full_fetch:bool -> ?cache_dir:dirname -> ?cache_urls:url list ->
?working_dir:bool -> ?subpath:subpath ->
Expand Down
4 changes: 2 additions & 2 deletions src/repository/opamRepositoryBackend.mli
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ module type S = sig
[checksum] can be used for retrieval but is NOT checked by this
function.
If [full_fetch] is set to true, VCS repository is retrieved with full
history (by default, no history).
If [full_fetch] is set to false, VCS repository is retrieved with shallow
history (by default, full history).
If [cache_dir] is given, the directory is used by VCS tool as a its cache
directory.
If [subpath] is given, only that [subpath] of the url is retrieved. *)
Expand Down
4 changes: 2 additions & 2 deletions src/repository/opamVCS.mli
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ module type VCS = sig
Be aware that the remote URL might have been changed, so make sure
to update accordingly.
If [full_fetch] is set to true, VCS repository is retrieved with full
history (by default, no history).
If [full_fetch] is set to false, VCS repository is retrieved with shallow
history (by default, full history).
If [cache_dir] is given, the directory is used by VCS tool as a its cache
directory.
If [subpath] is given, only that [subpath] of the url is retrieved. *)
Expand Down

0 comments on commit a4396f1

Please sign in to comment.