summaryrefslogtreecommitdiff
path: root/notes.h
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2010-11-15 00:57:17 +0100
committerJunio C Hamano <gitster@pobox.com>2010-11-17 13:22:53 -0800
commita6a09095a08339afc8468d053ff978ed4662a1d5 (patch)
tree915beb0e1f4fbe5fe5932b8188a1ac983c7ed786 /notes.h
parent6cfd6a9dea889707fa207ee2003010c3b56b2131 (diff)
downloadgit-a6a09095a08339afc8468d053ff978ed4662a1d5.tar.gz
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 'notes.h')
-rw-r--r--notes.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/notes.h b/notes.h
index b3725750bb..93a73657e2 100644
--- a/notes.h
+++ b/notes.h
@@ -27,6 +27,7 @@ typedef int (*combine_notes_fn)(unsigned char *cur_sha1, const unsigned char *ne
int combine_notes_concatenate(unsigned char *cur_sha1, const unsigned char *new_sha1);
int combine_notes_overwrite(unsigned char *cur_sha1, const unsigned char *new_sha1);
int combine_notes_ignore(unsigned char *cur_sha1, const unsigned char *new_sha1);
+int combine_notes_cat_sort_uniq(unsigned char *cur_sha1, const unsigned char *new_sha1);
/*
* Notes tree object