mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-24 00:39:58 +03:00
introduce Path.relativeSingleton to replace textToRelative
This commit is contained in:
parent
f7a73e4780
commit
ff2414f02a
@ -530,11 +530,9 @@ loop = do
|
||||
|
||||
LoadPullRequestI baseRepo headRepo ->
|
||||
if Branch.isEmpty0 currentBranch0 then do
|
||||
let textToRelative =
|
||||
Path.Relative . Path.Path . Seq.singleton . NameSegment.NameSegment
|
||||
base = textToRelative "base"
|
||||
head = textToRelative "head"
|
||||
merged = textToRelative "merged"
|
||||
let base = Path.relativeSingleton "base"
|
||||
head = Path.relativeSingleton "head"
|
||||
merged = Path.relativeSingleton "merged"
|
||||
abs = resolveToAbsolute . Path.Path' . Right
|
||||
-- 1. pull baseRepo into `base`
|
||||
-- 2. pull headRepo into `head`
|
||||
|
@ -218,6 +218,9 @@ absoluteEmpty = Absolute empty
|
||||
relativeEmpty' :: Path'
|
||||
relativeEmpty' = Path' (Right (Relative empty))
|
||||
|
||||
relativeSingleton :: NameSegment -> Relative
|
||||
relativeSingleton = Relative . Path . Seq.singleton
|
||||
|
||||
toAbsolutePath :: Absolute -> Path' -> Absolute
|
||||
toAbsolutePath cur (Path' p) = either id (relativeToAbsolutePath cur) p
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user