diff --git a/unison-cli/src/Unison/Codebase/Editor/HandleInput.hs b/unison-cli/src/Unison/Codebase/Editor/HandleInput.hs index 187b1bb63..5b2696c53 100644 --- a/unison-cli/src/Unison/Codebase/Editor/HandleInput.hs +++ b/unison-cli/src/Unison/Codebase/Editor/HandleInput.hs @@ -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 diff --git a/unison-src/transcripts/empty-namespaces.output.md b/unison-src/transcripts/empty-namespaces.output.md index b6089f1c2..68accf1a2 100644 --- a/unison-src/transcripts/empty-namespaces.output.md +++ b/unison-src/transcripts/empty-namespaces.output.md @@ -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) + +```