[PATCHv4 14/21] Documentation: Preliminary docs on 'git notes merge'

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johan Herland
Date: Wednesday, October 20, 2010 - 7:08 pm

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>
---
 Documentation/git-notes.txt |   44 ++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 43 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index 2981d8c..07a5042 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -14,6 +14,7 @@ SYNOPSIS
 'git notes' append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
 'git notes' edit [<object>]
 'git notes' show [<object>]
+'git notes' merge [-v | -q] [-s <strategy> ] <notes_ref>
 'git notes' remove [<object>]
 'git notes' prune [-n | -v]
 
@@ -83,6 +84,16 @@ edit::
 show::
 	Show the notes for a given object (defaults to HEAD).
 
+merge::
+	Merge the given notes ref into the current notes ref.
+	This will try to merge the changes made by the given
+	notes ref (called "remote") since the merge-base (if
+	any) into the current notes ref (called "local").
++
+If conflicts arise and a strategy for automatically resolving
+conflicting notes (see the -s/--strategy option) is not given,
+the merge fails (TODO).
+
 remove::
 	Remove the notes for a given object (defaults to HEAD).
 	This is equivalent to specifying an empty note message to
@@ -133,9 +144,23 @@ OPTIONS
 	Do not remove anything; just report the object names whose notes
 	would be removed.
 
+-s <strategy>::
+--strategy=<strategy>::
+	When merging notes, resolve notes conflicts using the given
+	strategy. The following strategies are recognized: "manual"
+	(default), "ours", "theirs" and "union".
+	See the "NOTES MERGE STRATEGIES" section below for more
+	information on each notes merge strategy.
+
+-q::
+--quiet::
+	When merging notes, operate quietly.
+
 -v::
 --verbose::
-	Report all object names whose notes are removed.
+	When merging notes, be more verbose.
+	When pruning notes, report all object names whose notes are
+	removed.
 
 
 DISCUSSION
@@ -163,6 +188,23 @@ object, in which case the history of the notes can be read with
 `git log -p -g <refname>`.
 
 
+NOTES MERGE STRATEGIES
+----------------------
+
+The default notes merge strategy is "manual", which is not yet
+implemented (TODO).
+
+"ours" automatically resolves conflicting notes in favor of the local
+version (i.e. the current notes ref).
+
+"theirs" automatically resolves notes conflicts in favor of the remote
+version (i.e. the given notes ref being merged into the current notes
+ref).
+
+"union" automatically resolves notes conflicts by concatenating the
+local and remote versions.
+
+
 EXAMPLES
 --------
 
-- 
1.7.3.98.g5ad7d9

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCHv4 00/21] git notes merge, Johan Herland, (Wed Oct 20, 7:08 pm)
[PATCHv4 14/21] Documentation: Preliminary docs on 'git no ..., Johan Herland, (Wed Oct 20, 7:08 pm)
Re: [PATCHv4 06/21] notes.h/c: Propagate combine_notes_fn ..., Jonathan Nieder, (Wed Oct 20, 10:21 pm)
Re: [PATCHv4 00/21] git notes merge, Sverre Rabbelier, (Thu Oct 21, 2:00 pm)
Re: [PATCHv4 00/21] git notes merge, Junio C Hamano, (Thu Oct 21, 4:20 pm)
Re: [PATCHv4 00/21] git notes merge, Jonathan Nieder, (Thu Oct 21, 4:30 pm)
Re: [PATCHv4 00/21] git notes merge, Johan Herland, (Fri Oct 22, 8:41 am)
Re: [PATCHv4 00/21] git notes merge, Sverre Rabbelier, (Fri Oct 22, 8:54 am)
Re: [PATCHv4 00/21] git notes merge, Johan Herland, (Fri Oct 22, 3:28 pm)
Re: [PATCHv4 00/21] git notes merge, Johan Herland, (Fri Oct 22, 5:47 pm)
Re: [PATCHv4 00/21] git notes merge, Sverre Rabbelier, (Fri Oct 22, 6:38 pm)
Re: [PATCHv4 00/21] git notes merge, Sverre Rabbelier, (Fri Oct 22, 6:44 pm)