read-tree --aggressive: remove deleted entry from the working tree.
[git.git] / fetch-pack.c
index 2528053..aa6f42a 100644 (file)
@@ -262,9 +262,6 @@ static void filter_refs(struct ref **refs, int nr_match, char **match)
 {
        struct ref *prev, *current, *next;
 
-       if (!nr_match)
-               return;
-
        for (prev = NULL, current = *refs; current; current = next) {
                next = current->next;
                if ((!memcmp(current->name, "refs/", 5) &&
@@ -381,7 +378,7 @@ static int fetch_pack(int fd[2], int nr_match, char **match)
                fprintf(stderr, "warning: no common commits\n");
 
        if (keep_pack)
-               status = receive_keep_pack(fd, "git-fetch-pack");
+               status = receive_keep_pack(fd, "git-fetch-pack", quiet);
        else
                status = receive_unpack_pack(fd, "git-fetch-pack", quiet);
 
@@ -416,11 +413,11 @@ int main(int argc, char **argv)
                                exec = arg + 7;
                                continue;
                        }
-                       if (!strcmp("-q", arg)) {
+                       if (!strcmp("--quiet", arg) || !strcmp("-q", arg)) {
                                quiet = 1;
                                continue;
                        }
-                       if (!strcmp("-k", arg)) {
+                       if (!strcmp("--keep", arg) || !strcmp("-k", arg)) {
                                keep_pack = 1;
                                continue;
                        }