X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-fetch.c;h=7eec4a0e43ad5760f1060a7d5bcf2a5083015130;hb=2c47789d817aaf745a5ce5d5f79619c634cc8566;hp=97fdc51e3188143e0546512f59be9d2542dcac9a;hpb=48c12d4b9b5a3cd033e6e8acbd38ffd5e6b13797;p=git.git diff --git a/builtin-fetch.c b/builtin-fetch.c index 97fdc51e3..7eec4a0e4 100644 --- a/builtin-fetch.c +++ b/builtin-fetch.c @@ -5,14 +5,14 @@ #include "refs.h" #include "commit.h" #include "builtin.h" -#include "path-list.h" +#include "string-list.h" #include "remote.h" #include "transport.h" #include "run-command.h" #include "parse-options.h" static const char * const builtin_fetch_usage[] = { - "git-fetch [options] [ ...]", + "git fetch [options] [ ...]", NULL }; @@ -465,8 +465,8 @@ static int fetch_refs(struct transport *transport, struct ref *ref_map) static int add_existing(const char *refname, const unsigned char *sha1, int flag, void *cbdata) { - struct path_list *list = (struct path_list *)cbdata; - path_list_insert(refname, list); + struct string_list *list = (struct string_list *)cbdata; + string_list_insert(refname, list); return 0; } @@ -485,8 +485,8 @@ static void find_non_local_tags(struct transport *transport, struct ref **head, struct ref ***tail) { - struct path_list existing_refs = { NULL, 0, 0, 0 }; - struct path_list new_refs = { NULL, 0, 0, 1 }; + struct string_list existing_refs = { NULL, 0, 0, 0 }; + struct string_list new_refs = { NULL, 0, 0, 1 }; char *ref_name; int ref_name_len; const unsigned char *ref_sha1; @@ -515,11 +515,11 @@ static void find_non_local_tags(struct transport *transport, } } - if (!path_list_has_path(&existing_refs, ref_name) && - !path_list_has_path(&new_refs, ref_name) && + if (!string_list_has_string(&existing_refs, ref_name) && + !string_list_has_string(&new_refs, ref_name) && (has_sha1_file(ref->old_sha1) || will_fetch(head, ref->old_sha1))) { - path_list_insert(ref_name, &new_refs); + string_list_insert(ref_name, &new_refs); rm = alloc_ref_from_str(ref_name); rm->peer_ref = alloc_ref_from_str(ref_name); @@ -530,8 +530,8 @@ static void find_non_local_tags(struct transport *transport, } free(ref_name); } - path_list_clear(&existing_refs, 0); - path_list_clear(&new_refs, 0); + string_list_clear(&existing_refs, 0); + string_list_clear(&new_refs, 0); } static int do_fetch(struct transport *transport,