RFR: 2176: Repository.fetch should return an Optional<Hash>
Erik Joelsson
erikj at openjdk.org
Tue Feb 20 15:41:10 UTC 2024
On Mon, 19 Feb 2024 14:01:33 GMT, Erik Duveblad <ehelin at openjdk.org> wrote:
> Hi all,
>
> please review this patch that makes `Repository.fetch` return an `Optional<Hash>` instead of just a `Hash` (since a `fetch` operation might now always fetch a commit, for example if code is trying to fetch a ref that does not exist in the remote repo). A fairly large diff, but I just moved the `.orElseThrow` one frame up in the call chain, so now the caller decides whether it should do `.orElseThrow` (instread of the callee, in this case `fetch`).
>
> Thanks,
> Erik
Marked as reviewed by erikj (Lead).
-------------
PR Review: https://git.openjdk.org/skara/pull/1613#pullrequestreview-1890779650
More information about the skara-dev
mailing list