add merge.commit failure test

This commit is contained in:
Mitchell Rosen 2024-06-13 08:29:02 -04:00
parent 2e97d46db3
commit e903a1c155
2 changed files with 42 additions and 2 deletions

View File

@ -974,7 +974,7 @@ project/alice> merge bob
.> project.delete project
```
## `merge.commit` example
## `merge.commit` example (success)
After merge conflicts are resolved, you can use `merge.commit` rather than `switch` + `merge` + `branch.delete` to
"commit" your changes.
@ -1040,6 +1040,27 @@ project/alice> branches
.> project.delete project
```
## `merge.commit` example (failure)
`merge.commit` can only be run on a "merge branch".
```ucm:hide
.> project.create-empty project
project/main> builtins.mergeio
```
```ucm
project/main> branch topic
```
```ucm:error
project/topic> merge.commit
```
```ucm:hide
.> project.delete project
```
## Precondition violations

View File

@ -1070,7 +1070,7 @@ bob _ = 19
```
## `merge.commit` example
## `merge.commit` example (success)
After merge conflicts are resolved, you can use `merge.commit` rather than `switch` + `merge` + `branch.delete` to
"commit" your changes.
@ -1173,6 +1173,25 @@ project/alice> branches
2. bob
3. main
```
## `merge.commit` example (failure)
`merge.commit` can only be run on a "merge branch".
```ucm
project/main> branch topic
Done. I've created the topic branch based off of main.
Tip: To merge your work back into the main branch, first
`switch /main` then `merge /topic`.
```
```ucm
project/topic> merge.commit
It doesn't look like there's a merge in progress.
```
## Precondition violations