clean: avoid quoting twice
[gitweb.git] / builtin / clean.c
index b508d2cab482dffc97be1e8ee0481a6bb6157cf2..8f602c9f4174975597601fc1c0c2d26ccc51edbe 100644 (file)
@@ -44,7 +44,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
        struct dir_struct dir;
        static const char **pathspec;
        struct strbuf buf = STRBUF_INIT;
-       struct string_list exclude_list = { NULL, 0, 0, 0 };
+       struct string_list exclude_list = STRING_LIST_INIT_NODUP;
        const char *qname;
        char *seen = NULL;
        struct option options[] = {
@@ -153,7 +153,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
                                        printf("Removing %s\n", qname);
                                if (remove_dir_recursively(&directory,
                                                           rm_flags) != 0) {
-                                       warning("failed to remove '%s'", qname);
+                                       warning("failed to remove %s", qname);
                                        errors++;
                                }
                        } else if (show_only) {
@@ -173,7 +173,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
                                printf("Removing %s\n", qname);
                        }
                        if (unlink(ent->name) != 0) {
-                               warning("failed to remove '%s'", qname);
+                               warning("failed to remove %s", qname);
                                errors++;
                        }
                }