Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
git.2224
git-1.8.5.6-rename-sort_string_list-rename-to-s...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File git-1.8.5.6-rename-sort_string_list-rename-to-string_list_sort.patch of Package git.2224
From 3383e199847485fedf83d0fa38bbd5363074093a Mon Sep 17 00:00:00 2001 From: Michael Haggerty <mhagger@alum.mit.edu> Date: Tue, 25 Nov 2014 09:02:35 +0100 Subject: [PATCH] sort_string_list(): rename to string_list_sort() The new name is more consistent with the names of other string_list-related functions. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> --- Documentation/technical/api-string-list.txt | 4 ++-- builtin/apply.c | 2 +- builtin/receive-pack.c | 2 +- builtin/remote.c | 12 ++++++------ builtin/repack.c | 2 +- connect.c | 2 +- notes.c | 2 +- remote.c | 6 +++--- sha1_file.c | 2 +- string-list.c | 4 ++-- string-list.h | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) Index: git-1.8.5.6/Documentation/technical/api-string-list.txt =================================================================== --- git-1.8.5.6.orig/Documentation/technical/api-string-list.txt 2015-10-09 17:37:42.610973732 +0200 +++ git-1.8.5.6/Documentation/technical/api-string-list.txt 2015-10-09 17:37:52.906902263 +0200 @@ -29,7 +29,7 @@ member (you need this if you add things `unsorted_string_list_has_string` and get it from the list using `string_list_lookup` for sorted lists. -. Can sort an unsorted list using `sort_string_list`. +. Can sort an unsorted list using `string_list_sort`. . Can remove duplicate items from a sorted list using `string_list_remove_duplicates`. @@ -141,7 +141,7 @@ write `string_list_insert(...)->util = . ownership of a malloc()ed string to a `string_list` that has `strdup_string` set. -`sort_string_list`:: +`string_list_sort`:: Sort the list's entries by string value in `strcmp()` order. Index: git-1.8.5.6/builtin/apply.c =================================================================== --- git-1.8.5.6.orig/builtin/apply.c 2015-10-09 17:37:42.611973726 +0200 +++ git-1.8.5.6/builtin/apply.c 2015-10-09 17:37:52.907902256 +0200 @@ -4113,7 +4113,7 @@ static int write_out_results(struct patc if (cpath.nr) { struct string_list_item *item; - sort_string_list(&cpath); + string_list_sort(&cpath); for_each_string_list_item(item, &cpath) fprintf(stderr, "U %s\n", item->string); string_list_clear(&cpath, 0); Index: git-1.8.5.6/builtin/receive-pack.c =================================================================== --- git-1.8.5.6.orig/builtin/receive-pack.c 2015-10-09 17:37:42.612973719 +0200 +++ git-1.8.5.6/builtin/receive-pack.c 2015-10-09 17:37:52.908902249 +0200 @@ -644,7 +644,7 @@ static void check_aliased_updates(struct string_list_append(&ref_list, cmd->ref_name); item->util = (void *)cmd; } - sort_string_list(&ref_list); + string_list_sort(&ref_list); for (cmd = commands; cmd; cmd = cmd->next) { if (!cmd->error_string) Index: git-1.8.5.6/builtin/remote.c =================================================================== --- git-1.8.5.6.orig/builtin/remote.c 2015-10-09 17:37:42.612973719 +0200 +++ git-1.8.5.6/builtin/remote.c 2015-10-09 17:37:52.908902249 +0200 @@ -358,9 +358,9 @@ static int get_ref_states(const struct r free_refs(stale_refs); free_refs(fetch_map); - sort_string_list(&states->new); - sort_string_list(&states->tracked); - sort_string_list(&states->stale); + string_list_sort(&states->new); + string_list_sort(&states->tracked); + string_list_sort(&states->stale); return 0; } @@ -906,7 +906,7 @@ static int get_remote_ref_states(const c get_push_ref_states(remote_refs, states); } else { for_each_ref(append_ref_to_tracked_list, states); - sort_string_list(&states->tracked); + string_list_sort(&states->tracked); get_push_ref_states_noquery(states); } @@ -1546,7 +1546,7 @@ static int show_all(void) if (!result) { int i; - sort_string_list(&list); + string_list_sort(&list); for (i = 0; i < list.nr; i++) { struct string_list_item *item = list.items + i; if (verbose) Index: git-1.8.5.6/builtin/repack.c =================================================================== --- git-1.8.5.6.orig/builtin/repack.c 2015-10-09 17:37:52.909902242 +0200 +++ git-1.8.5.6/builtin/repack.c 2015-10-09 17:38:24.921679863 +0200 @@ -347,7 +347,7 @@ int cmd_repack(int argc, const char **ar /* End of pack replacement. */ if (delete_redundant) { - sort_string_list(&names); + string_list_sort(&names); for_each_string_list_item(item, &existing_packs) { char *sha1; size_t len = strlen(item->string); Index: git-1.8.5.6/connect.c =================================================================== --- git-1.8.5.6.orig/connect.c 2015-10-09 17:37:42.613973712 +0200 +++ git-1.8.5.6/connect.c 2015-10-09 17:37:52.909902242 +0200 @@ -105,7 +105,7 @@ static void annotate_refs_with_symref_in parse_one_symref_info(&symref, val, len); feature_list = val + 1; } - sort_string_list(&symref); + string_list_sort(&symref); for (; ref; ref = ref->next) { struct string_list_item *item; Index: git-1.8.5.6/notes.c =================================================================== --- git-1.8.5.6.orig/notes.c 2015-10-09 17:37:42.613973712 +0200 +++ git-1.8.5.6/notes.c 2015-10-09 17:37:52.910902235 +0200 @@ -902,7 +902,7 @@ int combine_notes_cat_sort_uniq(unsigned if (string_list_add_note_lines(&sort_uniq_list, new_sha1)) goto out; string_list_remove_empty_items(&sort_uniq_list, 0); - sort_string_list(&sort_uniq_list); + string_list_sort(&sort_uniq_list); string_list_remove_duplicates(&sort_uniq_list, 0); /* create a new blob object from sort_uniq_list */ Index: git-1.8.5.6/remote.c =================================================================== --- git-1.8.5.6.orig/remote.c 2015-10-09 17:37:42.614973705 +0200 +++ git-1.8.5.6/remote.c 2015-10-09 17:37:52.910902235 +0200 @@ -1253,7 +1253,7 @@ static void add_missing_tags(struct ref } clear_commit_marks_many(sent_tips.nr, sent_tips.tip, TMP_MARK); - sort_string_list(&dst_tag); + string_list_sort(&dst_tag); /* Collect tags they do not have. */ for (ref = src; ref; ref = ref->next) { @@ -1318,7 +1318,7 @@ static void prepare_ref_index(struct str for ( ; ref; ref = ref->next) string_list_append_nodup(ref_index, ref->name)->util = ref; - sort_string_list(ref_index); + string_list_sort(ref_index); } /* @@ -1987,7 +1987,7 @@ struct ref *get_stale_heads(struct refsp info.ref_count = ref_count; for (ref = fetch_map; ref; ref = ref->next) string_list_append(&ref_names, ref->name); - sort_string_list(&ref_names); + string_list_sort(&ref_names); for_each_ref(get_stale_heads_cb, &info); string_list_clear(&ref_names, 0); return stale_refs; Index: git-1.8.5.6/sha1_file.c =================================================================== --- git-1.8.5.6.orig/sha1_file.c 2015-10-09 17:37:42.614973705 +0200 +++ git-1.8.5.6/sha1_file.c 2015-10-09 17:37:52.911902228 +0200 @@ -1132,7 +1132,7 @@ static void report_pack_garbage(struct s if (!report_garbage) return; - sort_string_list(list); + string_list_sort(list); for (i = 0; i < list->nr; i++) { const char *path = list->items[i].string; Index: git-1.8.5.6/string-list.c =================================================================== --- git-1.8.5.6.orig/string-list.c 2015-10-09 17:37:42.615973698 +0200 +++ git-1.8.5.6/string-list.c 2015-10-09 17:37:52.911902228 +0200 @@ -215,7 +215,7 @@ struct string_list_item *string_list_app /* Yuck */ static compare_strings_fn compare_for_qsort; -/* Only call this from inside sort_string_list! */ +/* Only call this from inside string_list_sort! */ static int cmp_items(const void *a, const void *b) { const struct string_list_item *one = a; @@ -223,7 +223,7 @@ static int cmp_items(const void *a, cons return compare_for_qsort(one->string, two->string); } -void sort_string_list(struct string_list *list) +void string_list_sort(struct string_list *list) { compare_for_qsort = list->cmp ? list->cmp : strcmp; qsort(list->items, list->nr, sizeof(*list->items), cmp_items); Index: git-1.8.5.6/string-list.h =================================================================== --- git-1.8.5.6.orig/string-list.h 2015-10-09 17:37:42.615973698 +0200 +++ git-1.8.5.6/string-list.h 2015-10-09 17:37:52.911902228 +0200 @@ -83,7 +83,7 @@ struct string_list_item *string_list_app */ struct string_list_item *string_list_append_nodup(struct string_list *list, char *string); -void sort_string_list(struct string_list *list); +void string_list_sort(struct string_list *list); int unsorted_string_list_has_string(struct string_list *list, const char *string); struct string_list_item *unsorted_string_list_lookup(struct string_list *list, const char *string);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor