X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin%2Fapply.c;h=f38c1f7b88fafa18550762685e3bb5b15bfa701f;hb=c1807defb83299dd85117c0e6b94fb7d4ade97c7;hp=562e5345fc969a5ad03b3ade4952668bcec09136;hpb=8c7da8690d2dfc84c9f827796bc730d900b5fba7;p=git.git diff --git a/builtin/apply.c b/builtin/apply.c index 562e5345f..f38c1f7b8 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -2628,7 +2628,7 @@ static struct patch *in_fn_table(const char *name) if (name == NULL) return NULL; - item = string_list_lookup(name, &fn_table); + item = string_list_lookup(&fn_table, name); if (item != NULL) return (struct patch *)item->util; @@ -2664,7 +2664,7 @@ static void add_to_fn_table(struct patch *patch) * file creations and copies */ if (patch->new_name != NULL) { - item = string_list_insert(patch->new_name, &fn_table); + item = string_list_insert(&fn_table, patch->new_name); item->util = patch; } @@ -2673,7 +2673,7 @@ static void add_to_fn_table(struct patch *patch) * later chunks shouldn't patch old names */ if ((patch->new_name == NULL) || (patch->is_rename)) { - item = string_list_insert(patch->old_name, &fn_table); + item = string_list_insert(&fn_table, patch->old_name); item->util = PATH_WAS_DELETED; } } @@ -2686,7 +2686,7 @@ static void prepare_fn_table(struct patch *patch) while (patch) { if ((patch->new_name == NULL) || (patch->is_rename)) { struct string_list_item *item; - item = string_list_insert(patch->old_name, &fn_table); + item = string_list_insert(&fn_table, patch->old_name); item->util = PATH_TO_BE_DELETED; } patch = patch->next; @@ -2979,8 +2979,7 @@ static void build_fake_ancestor(struct patch *list, const char *filename) else if (get_sha1(patch->old_sha1_prefix, sha1)) /* git diff has no index line for mode/type changes */ if (!patch->lines_added && !patch->lines_deleted) { - if (get_current_sha1(patch->new_name, sha1) || - get_current_sha1(patch->old_name, sha1)) + if (get_current_sha1(patch->old_name, sha1)) die("mode change for %s, which is not " "in current HEAD", name); sha1_ptr = sha1; @@ -3394,7 +3393,7 @@ static void add_name_limit(const char *name, int exclude) { struct string_list_item *it; - it = string_list_append(name, &limit_by_name); + it = string_list_append(&limit_by_name, name); it->util = exclude ? NULL : (void *) 1; }