Skip to content

Commit

Permalink
fix: fetchcommits and terminates expnential deepening if no commits f…
Browse files Browse the repository at this point in the history
…etched (#330)
  • Loading branch information
nikhedonia authored and njlr committed Mar 3, 2019
1 parent 281b0fc commit 432ac62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion buckaroo/DefaultSourceExplorer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ type DefaultSourceExplorer (console : ConsoleManager, downloadManager : Download
match maybeBranchRef with
| Some branchRef ->
yield branchRef.Revision
yield! gitManager.FetchCommits url branchRef.Revision
yield! gitManager.FetchCommits url branchRef.Name
()
| None -> ()
}
Expand Down
1 change: 1 addition & 0 deletions buckaroo/GitCli.fs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ type GitCli (console : ConsoleManager) =
return (skip + (nextList |> List.length), nextList, fetchNext)
})
( 0, List.empty, async { return () } )
|> AsyncSeq.takeWhile (fun (_, revs, _) -> revs.Length > 0)
|> AsyncSeq.collect (fun (_, revs, fetchNext) -> asyncSeq {
yield! revs |> AsyncSeq.ofSeq
do! fetchNext
Expand Down

0 comments on commit 432ac62

Please sign in to comment.