RFR: 2176: Repository.fetch should return an Optional<Hash>
Erik Duveblad
ehelin at openjdk.org
Tue Feb 20 17:07:11 UTC 2024
On Tue, 20 Feb 2024 15:39:06 GMT, Erik Joelsson <erikj 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).
Thanks @erikj79 for reviewing!
-------------
PR Comment: https://git.openjdk.org/skara/pull/1613#issuecomment-1954658461
More information about the skara-dev
mailing list