aboutsummaryrefslogtreecommitdiff
path: root/pkt-line.h
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2012-11-04 08:07:08 +0100
committerJeff King <peff@peff.net>2012-11-08 11:34:36 -0500
commit131352433621e89b2e8c58d8327b1d55bf0bc8d0 (patch)
tree9e1b10b0054233197d648d5af5dbcd531bef01ea /pkt-line.h
parentf992f0c80f30ac5a0aacfdfad55083dafb33047e (diff)
downloadgit-131352433621e89b2e8c58d8327b1d55bf0bc8d0.tar.gz
git-131352433621e89b2e8c58d8327b1d55bf0bc8d0.tar.xz
combine_notes_cat_sort_uniq(): sort and dedup lines all at once
Instead of reading lines one by one and insertion-sorting them into a string_list, read all of the lines, sort them, then remove duplicates. Aside from being less code, this reduces the complexity from O(N^2) to O(N lg N) in the total number of lines. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'pkt-line.h')
0 files changed, 0 insertions, 0 deletions