···360360let pull ~proc ~fs ~config ?handle () =
361361 match handle with
362362 | Some h ->
363363+ Logs.info (fun m -> m "Pulling %s" h);
363364 let local_path = Fpath.(Verse_config.verse_path config / h) in
364365 if not (Git.is_repo ~proc ~fs local_path) then
365366 Error (Member_not_found h)
366367 else
367368 (match Git.pull ~proc ~fs local_path with
368368- | Error e -> Error (Git_error e)
369369- | Ok () -> Ok ())
369369+ | Error e ->
370370+ Logs.err (fun m -> m "Failed to pull %s: %a" h Git.pp_error e);
371371+ Error (Git_error e)
372372+ | Ok () ->
373373+ Logs.info (fun m -> m "Pulled %s" h);
374374+ Ok ())
370375 | None ->
371376 (* Pull all tracked members *)
372377 let tracked_handles = get_tracked_handles ~fs config in
378378+ Logs.info (fun m -> m "Pulling %d tracked members" (List.length tracked_handles));
373379 let errors =
374380 List.filter_map
375381 (fun h ->
376382 let local_path = Fpath.(Verse_config.verse_path config / h) in
377377- if Git.is_repo ~proc ~fs local_path then
383383+ if Git.is_repo ~proc ~fs local_path then begin
384384+ Logs.info (fun m -> m "Pulling %s" h);
378385 match Git.pull ~proc ~fs local_path with
379379- | Error e -> Some (Fmt.str "%s: %a" h Git.pp_error e)
380380- | Ok () -> None
381381- else None)
386386+ | Error e ->
387387+ Logs.warn (fun m -> m "Failed to pull %s: %a" h Git.pp_error e);
388388+ Some (Fmt.str "%s: %a" h Git.pp_error e)
389389+ | Ok () ->
390390+ Logs.info (fun m -> m "Pulled %s" h);
391391+ None
392392+ end
393393+ else begin
394394+ Logs.warn (fun m -> m "Skipping %s: not a git repo" h);
395395+ None
396396+ end)
382397 tracked_handles
383398 in
384399 if errors = [] then Ok ()