Skip to content

Commit 90b9f3c

Browse files
committed
Ensure that older checkouts retrieve the right index
Since we migrated from avsm/obi-logs to ocaml, the origin of the git remote might be wrong in existing checkouts. This just forces a set-url to be sure. Fixes #18 (again) Signed-off-by: Anil Madhavapeddy <[email protected]>
1 parent 22b8009 commit 90b9f3c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/opam-ci/repos.ml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ let rec init ?(retry= false) ?(refresh= `Poll) () =
8080
run_git_in_repo ~repo:local_logs_repo
8181
["fetch"; "-q"; remote_logs_repo (); "index"]
8282
>>= fun () ->
83-
run_git_in_repo ~repo:local_logs_repo ["reset"; "-q"; "--hard"; "@{u}"]
83+
run_git_in_repo ~repo:local_logs_repo
84+
["remote"; "set-url"; "origin"; remote_logs_repo ()]
85+
>>= fun () ->
86+
run_git_in_repo ~repo:local_logs_repo
87+
["reset"; "-q"; "--hard"; "origin/index"]
8488
>>= fun () -> OS.File.write local_logs_mtime ""
8589
| `Local ->
8690
Logs.debug (fun l -> l "Using existing Obi logs") ;

0 commit comments

Comments
 (0)