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 ->
|
LoadPullRequestI baseRepo headRepo ->
|
||||||
if Branch.isEmpty0 currentBranch0 then do
|
if Branch.isEmpty0 currentBranch0 then do
|
||||||
let textToRelative =
|
let base = Path.relativeSingleton "base"
|
||||||
Path.Relative . Path.Path . Seq.singleton . NameSegment.NameSegment
|
head = Path.relativeSingleton "head"
|
||||||
base = textToRelative "base"
|
merged = Path.relativeSingleton "merged"
|
||||||
head = textToRelative "head"
|
|
||||||
merged = textToRelative "merged"
|
|
||||||
abs = resolveToAbsolute . Path.Path' . Right
|
abs = resolveToAbsolute . Path.Path' . Right
|
||||||
-- 1. pull baseRepo into `base`
|
-- 1. pull baseRepo into `base`
|
||||||
-- 2. pull headRepo into `head`
|
-- 2. pull headRepo into `head`
|
||||||
|
@ -218,6 +218,9 @@ absoluteEmpty = Absolute empty
|
|||||||
relativeEmpty' :: Path'
|
relativeEmpty' :: Path'
|
||||||
relativeEmpty' = Path' (Right (Relative empty))
|
relativeEmpty' = Path' (Right (Relative empty))
|
||||||
|
|
||||||
|
relativeSingleton :: NameSegment -> Relative
|
||||||
|
relativeSingleton = Relative . Path . Seq.singleton
|
||||||
|
|
||||||
toAbsolutePath :: Absolute -> Path' -> Absolute
|
toAbsolutePath :: Absolute -> Path' -> Absolute
|
||||||
toAbsolutePath cur (Path' p) = either id (relativeToAbsolutePath cur) p
|
toAbsolutePath cur (Path' p) = either id (relativeToAbsolutePath cur) p
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user