summaryrefslogtreecommitdiff
path: root/Documentation/git-notes.txt
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2010-11-14 23:57:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-11-17 21:22:53 (GMT)
commita6a09095a08339afc8468d053ff978ed4662a1d5 (patch)
tree915beb0e1f4fbe5fe5932b8188a1ac983c7ed786 /Documentation/git-notes.txt
parent6cfd6a9dea889707fa207ee2003010c3b56b2131 (diff)
downloadgit-a6a09095a08339afc8468d053ff978ed4662a1d5.zip
git-a6a09095a08339afc8468d053ff978ed4662a1d5.tar.gz
git-a6a09095a08339afc8468d053ff978ed4662a1d5.tar.bz2
git notes merge: Add another auto-resolving strategy: "cat_sort_uniq"
This new strategy is similar to "concatenate", but in addition to concatenating the two note candidates, this strategy sorts the resulting lines, and removes duplicate lines from the result. This is equivalent to applying the "cat | sort | uniq" shell pipeline to the two note candidates. This strategy is useful if the notes follow a line-based format where one wants to avoid duplicate lines in the merge result. Note that if either of the note candidates contain duplicate lines _prior_ to the merge, these will also be removed by this merge strategy. The patch also contains tests and documentation for the new strategy. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-notes.txt')
-rw-r--r--Documentation/git-notes.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index a822551..1de1417 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -155,7 +155,7 @@ OPTIONS
--strategy=<strategy>::
When merging notes, resolve notes conflicts using the given
strategy. The following strategies are recognized: "manual"
- (default), "ours", "theirs" and "union".
+ (default), "ours", "theirs", "union" and "cat_sort_uniq".
See the "NOTES MERGE STRATEGIES" section below for more
information on each notes merge strategy.
@@ -230,6 +230,16 @@ ref).
"union" automatically resolves notes conflicts by concatenating the
local and remote versions.
+"cat_sort_uniq" is similar to "union", but in addition to concatenating
+the local and remote versions, this strategy also sorts the resulting
+lines, and removes duplicate lines from the result. This is equivalent
+to applying the "cat | sort | uniq" shell pipeline to the local and
+remote versions. This strategy is useful if the notes follow a line-based
+format where one wants to avoid duplicated lines in the merge result.
+Note that if either the local or remote version contain duplicate lines
+prior to the merge, these will also be removed by this notes merge
+strategy.
+
EXAMPLES
--------