Merge branch 'mg/placeholders-are-lowercase' into maint
[gitweb.git] / builtin / receive-pack.c
index 7e4129ddc85e1408300947ff9c041524a1c10f48..760817dbd7fec0086a0a1b62e58ab4438f227b7b 100644 (file)
@@ -17,7 +17,7 @@ enum deny_action {
        DENY_UNCONFIGURED,
        DENY_IGNORE,
        DENY_WARN,
-       DENY_REFUSE,
+       DENY_REFUSE
 };
 
 static int deny_deletes;
@@ -501,7 +501,7 @@ static void check_aliased_update(struct command *cmd, struct string_list *list)
        if (!(flag & REF_ISSYMREF))
                return;
 
-       if ((item = string_list_lookup(dst_name, list)) == NULL)
+       if ((item = string_list_lookup(list, dst_name)) == NULL)
                return;
 
        cmd->skip_update = 1;
@@ -530,11 +530,11 @@ static void check_aliased_update(struct command *cmd, struct string_list *list)
 static void check_aliased_updates(struct command *commands)
 {
        struct command *cmd;
-       struct string_list ref_list = { NULL, 0, 0, 0 };
+       struct string_list ref_list = STRING_LIST_INIT_NODUP;
 
        for (cmd = commands; cmd; cmd = cmd->next) {
                struct string_list_item *item =
-                       string_list_append(cmd->ref_name, &ref_list);
+                       string_list_append(&ref_list, cmd->ref_name);
                item->util = (void *)cmd;
        }
        sort_string_list(&ref_list);