on master help sign in
Merge pull request #1038 from urbit/bold-merge-strats
eb6af84poprox
arvo/clay/using.md+13−11
@@ -92,46 +92,48 @@ with the source and destination commits as parents.
92Several strategies need a "merge-base". They find it by identifying
92Several strategies need a "merge-base". They find it by identifying
93the most recent common ancestor of the two desks. If none, fail
93the most recent common ancestor of the two desks. If none, fail
94with `%merge-no-merge-base`; if there are two or more, pick one.
94with `%merge-no-merge-base`; if there are two or more, pick one.
95+
96+#### Strategies
95
97
96−`%init`: the only way to create a desk. Not a true merge, since it
98+**`%init`**: the only way to create a desk. Not a true merge, since it
97simply assigns the source commit to the destination.
99simply assigns the source commit to the destination.
98
100
99−`%fine`: if source or destination are in the ancestry of each other,
101+**`%fine`**: if source or destination are in the ancestry of each other,
100use the newer one; else abort. If the destination is ahead of the
102use the newer one; else abort. If the destination is ahead of the
101source, succeed but do nothing. If the source is ahead of the
103source, succeed but do nothing. If the source is ahead of the
102destination, assign the next revision number to the source commit.
104destination, assign the next revision number to the source commit.
103Some call this "fast-forward".
105Some call this "fast-forward".
104
106
105−`%meet`: combine changes, failing if both sides changed the same file.
107+**`%meet`**: combine changes, failing if both sides changed the same file.
106Specifically, take diff(merge-base,source) and
108Specifically, take diff(merge-base,source) and
107diff(merge-base,destination) and combine them as long as those diffs
109diff(merge-base,destination) and combine them as long as those diffs
108touch different files.
110touch different files.
109
111
110−`%mate`: combine changes, failing if both sides changed the same part
112+**`%mate`**: combine changes, failing if both sides changed the same part
111of a file. Identical to `%meet`, except that some marks, like `%hoon`,
113of a file. Identical to `%meet`, except that some marks, like `%hoon`,
112allow intelligent merge of changes to different parts of a file.
114allow intelligent merge of changes to different parts of a file.
113
115
114−`%meld`: combine changes; if both sides changed the same part of a
116+**`%meld`**: combine changes; if both sides changed the same part of a
115file, use the version of the file in the merge-base.
117file, use the version of the file in the merge-base.
116
118
117−`%only-this`: create a merge commit with exactly the contents of the
119+**`%only-this`**: create a merge commit with exactly the contents of the
118destination desk.
120destination desk.
119
121
120−`%only-that`: create a merge commit with exactly the contents of the
122+**`%only-that`**: create a merge commit with exactly the contents of the
121source commit.
123source commit.
122
124
123−`%take-this`: create a merge commit with exactly the contents of the
125+**`%take-this`**: create a merge commit with exactly the contents of the
124destination desk except take any files from the source commit which
126destination desk except take any files from the source commit which
125are not in the destination desk.
127are not in the destination desk.
126
128
127−`%take-that`: create a merge commit with exactly the contents of the
129+**`%take-that`**: create a merge commit with exactly the contents of the
128source commit except preserve any files from the destination desk
130source commit except preserve any files from the destination desk
129which are not in the source commit.
131which are not in the source commit.
130
132
131−`%meet-this`: merge as in `%meet`, except if both sides changed the same
133+**`%meet-this`**: merge as in `%meet`, except if both sides changed the same
132file, use the version in the destination desk.
134file, use the version in the destination desk.
133
135
134−`%meet-that`: merge as in `%meet`, except if both sides changed the same
136+**`%meet-that`**: merge as in `%meet`, except if both sides changed the same
135file, use the version in the source commit.
137file, use the version in the source commit.
136
138
137#### Examples and notes:
139#### Examples and notes: