Documentation: Preliminary docs on 'git notes merge'
This patch has been improved by the following contributions: - Stephen Boyd: Use "automatically resolves" instead of "auto-resolves" - Stephen Boyd: Remove unbalanced '(' Thanks-to: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johan Herland committed
Nov 9, 2010 at 22:49 UTC
00f03061e27cad5497abcca2b70fa9fa04818275
1 file changed
+43
-1
Documentation/git-notes.txt
+43
-1
@@ -14,6 +14,7 @@ SYNOPSIS
14
'git notes' append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
15
'git notes' edit [<object>]
16
'git notes' show [<object>]
17
+'git notes' merge [-v | -q] [-s <strategy> ] <notes_ref>
18
'git notes' remove [<object>]
19
'git notes' prune [-n | -v]
20
@@ -83,6 +84,16 @@ edit::
84
show::
85
Show the notes for a given object (defaults to HEAD).
86
87
+merge::
88
+ Merge the given notes ref into the current notes ref.
89
+ This will try to merge the changes made by the given
90
+ notes ref (called "remote") since the merge-base (if
91
+ any) into the current notes ref (called "local").
92
++
93
+If conflicts arise and a strategy for automatically resolving
94
+conflicting notes (see the -s/--strategy option) is not given,
95
+the merge fails (TODO).
96
+
97
remove::
98
Remove the notes for a given object (defaults to HEAD).
99
This is equivalent to specifying an empty note message to
@@ -133,9 +144,23 @@ OPTIONS
144
Do not remove anything; just report the object names whose notes
145
would be removed.
146
147
+-s <strategy>::
148
+--strategy=<strategy>::
149
+ When merging notes, resolve notes conflicts using the given
150
+ strategy. The following strategies are recognized: "manual"
151
+ (default), "ours", "theirs" and "union".
152
+ See the "NOTES MERGE STRATEGIES" section below for more
153
+ information on each notes merge strategy.
154
+
155
+-q::
156
+--quiet::
157
+ When merging notes, operate quietly.
158
+
159
-v::
160
--verbose::
138
- Report all object names whose notes are removed.
161
+ When merging notes, be more verbose.
162
+ When pruning notes, report all object names whose notes are
163
+ removed.
164
165
166
DISCUSSION
@@ -163,6 +188,23 @@ object, in which case the history of the notes can be read with
188
`git log -p -g <refname>`.
189
190
191
+NOTES MERGE STRATEGIES
192
+----------------------
193
+
194
+The default notes merge strategy is "manual", which is not yet
195
+implemented (TODO).
196
+
197
+"ours" automatically resolves conflicting notes in favor of the local
198
+version (i.e. the current notes ref).
199
+
200
+"theirs" automatically resolves notes conflicts in favor of the remote
201
+version (i.e. the given notes ref being merged into the current notes
202
+ref).
203
+
204
+"union" automatically resolves notes conflicts by concatenating the
205
+local and remote versions.
206
+
207
+
208
EXAMPLES
209
--------
210