From c455c87c5cd42bbbe586b31cea1143132f3a39e4 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 21 Jul 2008 19:03:49 +0100 Subject: Rename path_list to string_list The name path_list was correct for the first usage of that data structure, but it really is a general-purpose string list. $ perl -i -pe 's/path-list/string-list/g' $(git grep -l path-list) $ perl -i -pe 's/path_list/string_list/g' $(git grep -l path_list) $ git mv path-list.h string-list.h $ git mv path-list.c string-list.c $ perl -i -pe 's/has_path/has_string/g' $(git grep -l has_path) $ perl -i -pe 's/path/string/g' string-list.[ch] $ git mv Documentation/technical/api-path-list.txt \ Documentation/technical/api-string-list.txt $ perl -i -pe 's/strdup_paths/strdup_strings/g' $(git grep -l strdup_paths) ... and then fix all users of string-list to access the member "string" instead of "path". Documentation/technical/api-string-list.txt needed some rewrapping, too. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- builtin-fast-export.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'builtin-fast-export.c') diff --git a/builtin-fast-export.c b/builtin-fast-export.c index a443d5946..e508ced6b 100644 --- a/builtin-fast-export.c +++ b/builtin-fast-export.c @@ -13,7 +13,7 @@ #include "log-tree.h" #include "revision.h" #include "decorate.h" -#include "path-list.h" +#include "string-list.h" #include "utf8.h" #include "parse-options.h" @@ -309,7 +309,7 @@ static void handle_tag(const char *name, struct tag *tag) } static void get_tags_and_duplicates(struct object_array *pending, - struct path_list *extra_refs) + struct string_list *extra_refs) { struct tag *tag; int i; @@ -330,7 +330,7 @@ static void get_tags_and_duplicates(struct object_array *pending, case OBJ_TAG: tag = (struct tag *)e->item; while (tag && tag->object.type == OBJ_TAG) { - path_list_insert(full_name, extra_refs)->util = tag; + string_list_insert(full_name, extra_refs)->util = tag; tag = (struct tag *)tag->tagged; } if (!tag) @@ -350,19 +350,19 @@ static void get_tags_and_duplicates(struct object_array *pending, } if (commit->util) /* more than one name for the same object */ - path_list_insert(full_name, extra_refs)->util = commit; + string_list_insert(full_name, extra_refs)->util = commit; else commit->util = full_name; } } -static void handle_tags_and_duplicates(struct path_list *extra_refs) +static void handle_tags_and_duplicates(struct string_list *extra_refs) { struct commit *commit; int i; for (i = extra_refs->nr - 1; i >= 0; i--) { - const char *name = extra_refs->items[i].path; + const char *name = extra_refs->items[i].string; struct object *object = extra_refs->items[i].util; switch (object->type) { case OBJ_TAG: @@ -445,7 +445,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) { struct rev_info revs; struct object_array commits = { 0, 0, NULL }; - struct path_list extra_refs = { NULL, 0, 0, 0 }; + struct string_list extra_refs = { NULL, 0, 0, 0 }; struct commit *commit; char *export_filename = NULL, *import_filename = NULL; struct option options[] = { -- cgit v1.2.1