Turn the flags in struct dir_struct into a single variable
[gitweb.git] / transport.c
index cfb73500ec9058e7503787bd3c6de06aa3fed064..9ad4a16c317b90770974aa5afbcf0986f4a5db91 100644 (file)
@@ -50,9 +50,7 @@ static int read_loose_refs(struct strbuf *path, int name_offset,
        memset (&list, 0, sizeof(list));
 
        while ((de = readdir(dir))) {
-               if (de->d_name[0] == '.' && (de->d_name[1] == '\0' ||
-                               (de->d_name[1] == '.' &&
-                                de->d_name[2] == '\0')))
+               if (is_dot_or_dotdot(de->d_name))
                        continue;
                ALLOC_GROW(list.entries, list.nr + 1, list.alloc);
                list.entries[list.nr++] = xstrdup(de->d_name);
@@ -642,7 +640,7 @@ static int fetch_refs_via_pack(struct transport *transport,
        args.include_tag = data->followtags;
        args.verbose = (transport->verbose > 0);
        args.quiet = (transport->verbose < 0);
-       args.no_progress = args.quiet || !isatty(1);
+       args.no_progress = args.quiet || (!transport->progress && !isatty(1));
        args.depth = data->depth;
 
        for (i = 0; i < nr_heads; i++)