cvsserver: add notes on how to get a checkout under Eclipse
[git.git] / rev-list.c
index d1c52a6..2e80930 100644 (file)
@@ -41,7 +41,6 @@ static const char rev_list_usage[] =
 
 struct rev_info revs;
 
-static int unpacked = 0;
 static int bisect_list = 0;
 static int verbose_header = 0;
 static int abbrev = DEFAULT_ABBREV;
@@ -214,8 +213,6 @@ static struct object_list **process_tree(struct tree *tree,
        return p;
 }
 
-static struct object_list *pending_objects = NULL;
-
 static void show_commit_list(struct commit_list *list)
 {
        struct object_list *objects = NULL, **p = &objects, *pending;
@@ -226,7 +223,7 @@ static void show_commit_list(struct commit_list *list)
                if (process_commit(commit) == STOP)
                        break;
        }
-       for (pending = pending_objects; pending; pending = pending->next) {
+       for (pending = revs.pending_objects; pending; pending = pending->next) {
                struct object *obj = pending->item;
                const char *name = pending->name;
                if (obj->flags & (UNINTERESTING | SEEN))
@@ -574,7 +571,7 @@ static struct commit_list *limit_list(struct commit_list *list)
 
                if (revs.max_age != -1 && (commit->date < revs.max_age))
                        obj->flags |= UNINTERESTING;
-               if (unpacked && has_sha1_pack(obj->sha1))
+               if (revs.unpacked && has_sha1_pack(obj->sha1))
                        obj->flags |= UNINTERESTING;
                add_parents_to_list(commit, &list);
                if (obj->flags & UNINTERESTING) {
@@ -597,7 +594,7 @@ static struct commit_list *limit_list(struct commit_list *list)
 int main(int argc, const char **argv)
 {
        struct commit_list *list;
-       int i, limited = 0;
+       int i;
 
        argc = setup_revisions(argc, argv, &revs);
 
@@ -657,11 +654,6 @@ int main(int argc, const char **argv)
                        bisect_list = 1;
                        continue;
                }
-               if (!strcmp(arg, "--unpacked")) {
-                       unpacked = 1;
-                       limited = 1;
-                       continue;
-               }
                if (!strcmp(arg, "--merge-order")) {
                        merge_order = 1;
                        continue;
@@ -675,34 +667,25 @@ int main(int argc, const char **argv)
        }
 
        list = revs.commits;
-       if (list && list->next)
-               limited = 1;
-
-       if (revs.topo_order)
-               limited = 1;
 
        if (!list &&
            (!(revs.tag_objects||revs.tree_objects||revs.blob_objects) && !revs.pending_objects))
                usage(rev_list_usage);
 
-       if (revs.paths) {
-               limited = 1;
+       if (revs.paths)
                diff_tree_setup_paths(revs.paths);
-       }
-       if (revs.max_age || revs.min_age)
-               limited = 1;
 
        save_commit_buffer = verbose_header;
        track_object_refs = 0;
 
        if (!merge_order) {             
                sort_by_date(&list);
-               if (list && !limited && revs.max_count == 1 &&
+               if (list && !revs.limited && revs.max_count == 1 &&
                    !revs.tag_objects && !revs.tree_objects && !revs.blob_objects) {
                        show_commit(list->item);
                        return 0;
                }
-               if (limited)
+               if (revs.limited)
                        list = limit_list(list);
                if (revs.topo_order)
                        sort_in_topological_order(&list, revs.lifo);