monorepo
monorepo copied to clipboard
unexpected return type of `repo.getOrigin()`
Problem
repo.getOrigin()
returns "unknown" if a repo can't be found (1), conflicting with the type definition of ReturnType<string>
(2), aka an origin always exists.
Proposal
Change the return type of repo.getOrigin()
to be string | undefined
to align with "maybe an origin exists" line of thought.
Agree! (also need this for the vsc extension)
100%
@janfjohannes can we remove safeHashOnly
from getOrigin()
?
- no need anymore
- re-introduce as utility functions to avoid conditional logic and bloat of repo.* API
closing as done becuase prio list says its done