Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Kate <kit-ty-kate@outlook.com>
  • Loading branch information
moyodiallo and kit-ty-kate authored Apr 2, 2024
1 parent ee893f1 commit 54b827d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/repository/opamGit.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ open OpamProcess.Job.Op

module VCS : OpamVCS.VCS = struct


let name = `git

let exists repo_root =
Expand Down Expand Up @@ -63,8 +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 ?cache_dir ?subpath repo_root repo_url = *)
let fetch ?(full_fetch = false) ?cache_dir ?subpath repo_root repo_url =
(match subpath with
| Some sp ->
git repo_root [ "config"; "--local"; "core.sparseCheckout"; "true" ]
Expand Down Expand Up @@ -98,9 +96,9 @@ let fetch ?(full_fetch = false) ?cache_dir ?subpath repo_root repo_url =
(OpamFilename.Dir.to_string (cache / "objects")))
global_cache;
(if full_fetch then
git repo_root [ "fetch" ; "-q"; origin; "--update-shallow"; refspec ]
else
git repo_root [ "fetch" ; "-q"; origin; "--update-shallow"; "--depth=1"; refspec ])
git repo_root [ "fetch" ; "-q"; origin; "--update-shallow"; refspec ]
else
git repo_root [ "fetch" ; "-q"; origin; "--update-shallow"; "--depth=1"; refspec ])
@@> fun r ->
if OpamProcess.check_success_and_cleanup r then
let refspec =
Expand Down

0 comments on commit 54b827d

Please sign in to comment.