mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-04 01:03:36 +03:00
Fix merging on empty namespaces
This commit is contained in:
parent
9bd63c79f1
commit
7e1ba673a4
@ -677,7 +677,7 @@ loop = do
|
||||
MergeLocalBranchI src0 dest0 mergeMode -> do
|
||||
let [src, dest] = resolveToAbsolute <$> [src0, dest0]
|
||||
srcb <- getAt src
|
||||
if Branch.isEmpty0 (Branch.head srcb)
|
||||
if Branch.isEmpty srcb
|
||||
then branchNotFound src0
|
||||
else do
|
||||
let err = Just $ MergeAlreadyUpToDate src0 dest0
|
||||
@ -685,7 +685,7 @@ loop = do
|
||||
PreviewMergeLocalBranchI src0 dest0 -> do
|
||||
let [src, dest] = resolveToAbsolute <$> [src0, dest0]
|
||||
srcb <- getAt src
|
||||
if Branch.isEmpty0 (Branch.head srcb)
|
||||
if Branch.isEmpty srcb
|
||||
then branchNotFound src0
|
||||
else do
|
||||
destb <- getAt dest
|
||||
|
@ -1,47 +1,3 @@
|
||||
<<<<<<< HEAD
|
||||
# Empty namespace behaviours
|
||||
|
||||
## Operations on empty namespaces
|
||||
|
||||
Add and then delete a term to add some history to a deleted namespace.
|
||||
|
||||
```unison
|
||||
deleted.x = 1
|
||||
stuff.thing = 2
|
||||
```
|
||||
|
||||
I should be allowed to fork over a deleted namespace
|
||||
|
||||
```ucm
|
||||
.> fork stuff deleted
|
||||
|
||||
Done.
|
||||
|
||||
```
|
||||
The history from the `deleted` namespace should have been overwritten by the history from `stuff`.
|
||||
|
||||
```ucm
|
||||
.> history stuff
|
||||
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
|
||||
|
||||
□ #3bm1524lb7 (start of history)
|
||||
|
||||
.> history deleted
|
||||
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
|
||||
|
||||
□ #3bm1524lb7 (start of history)
|
||||
|
||||
```
|
||||
||||||| 138799f92
|
||||
=======
|
||||
# Empty namespace behaviours
|
||||
|
||||
```unison
|
||||
@ -73,6 +29,8 @@ The deleted namespace shouldn't appear in `ls` output.
|
||||
to supply command arguments.
|
||||
|
||||
```
|
||||
## history
|
||||
|
||||
The history of the namespace should still exist if requested explicitly.
|
||||
|
||||
```ucm
|
||||
@ -117,4 +75,40 @@ Merging an empty namespace should still copy its history if it has some.
|
||||
□ #hkrqt3tm05 (start of history)
|
||||
|
||||
```
|
||||
>>>>>>> trunk
|
||||
Add and then delete a term to add some history to a deleted namespace.
|
||||
|
||||
```unison
|
||||
deleted.x = 1
|
||||
stuff.thing = 2
|
||||
```
|
||||
|
||||
I should be allowed to fork over a deleted namespace
|
||||
|
||||
```ucm
|
||||
.> fork stuff deleted
|
||||
|
||||
Done.
|
||||
|
||||
```
|
||||
The history from the `deleted` namespace should have been overwritten by the history from `stuff`.
|
||||
|
||||
```ucm
|
||||
.> history stuff
|
||||
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
|
||||
|
||||
□ #3bm1524lb7 (start of history)
|
||||
|
||||
.> history deleted
|
||||
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
|
||||
|
||||
□ #3bm1524lb7 (start of history)
|
||||
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user