[PATCH 0/5] Use string_lists when processing notes
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- Nov 4, 2012, 07:07 UTC
- Message-ID
- <1352012830-13591-1-git-send-email-mhagger@alum.mit.edu>
This simplifies the code. Also, sort lines all at once (O(N lg N)) rather than insertion sorting as lines are processed (O(N^2)) and fix the handling of empty values in GIT_NOTES_DISPLAY_REF and GIT_NOTES_REWRITE_REF.
Michael Haggerty (5): string_list: add a function string_list_remove_empty_items() Initialize sort_uniq_list using named constant combine_notes_cat_sort_uniq(): sort and dedup lines all at once notes: fix handling of colon-separated values string_list_add_refs_from_colon_sep(): use string_list_split()
Documentation/technical/api-string-list.txt | 9 ++++- notes.c | 61 ++++++++++++----------------- string-list.c | 9 +++++ string-list.h | 7 ++++ 4 files changed, 49 insertions(+), 37 deletions(-)
-- 1.8.0