@@ -41,7 +41,6 @@ static const char rev_list_usage[] =
4141
4242struct rev_info revs ;
4343
44- static int unpacked = 0 ;
4544static int bisect_list = 0 ;
4645static int verbose_header = 0 ;
4746static int abbrev = DEFAULT_ABBREV ;
@@ -572,7 +571,7 @@ static struct commit_list *limit_list(struct commit_list *list)
572571
573572 if (revs .max_age != -1 && (commit -> date < revs .max_age ))
574573 obj -> flags |= UNINTERESTING ;
575- if (unpacked && has_sha1_pack (obj -> sha1 ))
574+ if (revs . unpacked && has_sha1_pack (obj -> sha1 ))
576575 obj -> flags |= UNINTERESTING ;
577576 add_parents_to_list (commit , & list );
578577 if (obj -> flags & UNINTERESTING ) {
@@ -595,7 +594,7 @@ static struct commit_list *limit_list(struct commit_list *list)
595594int main (int argc , const char * * argv )
596595{
597596 struct commit_list * list ;
598- int i , limited = 0 ;
597+ int i ;
599598
600599 argc = setup_revisions (argc , argv , & revs );
601600
@@ -655,11 +654,6 @@ int main(int argc, const char **argv)
655654 bisect_list = 1 ;
656655 continue ;
657656 }
658- if (!strcmp (arg , "--unpacked" )) {
659- unpacked = 1 ;
660- limited = 1 ;
661- continue ;
662- }
663657 if (!strcmp (arg , "--merge-order" )) {
664658 merge_order = 1 ;
665659 continue ;
@@ -673,34 +667,25 @@ int main(int argc, const char **argv)
673667 }
674668
675669 list = revs .commits ;
676- if (list )
677- limited = 1 ;
678-
679- if (revs .topo_order )
680- limited = 1 ;
681670
682671 if (!list &&
683672 (!(revs .tag_objects || revs .tree_objects || revs .blob_objects ) && !revs .pending_objects ))
684673 usage (rev_list_usage );
685674
686- if (revs .paths ) {
687- limited = 1 ;
675+ if (revs .paths )
688676 diff_tree_setup_paths (revs .paths );
689- }
690- if (revs .max_age != -1 || revs .min_age != -1 )
691- limited = 1 ;
692677
693678 save_commit_buffer = verbose_header ;
694679 track_object_refs = 0 ;
695680
696681 if (!merge_order ) {
697682 sort_by_date (& list );
698- if (list && !limited && revs .max_count == 1 &&
683+ if (list && !revs . limited && revs .max_count == 1 &&
699684 !revs .tag_objects && !revs .tree_objects && !revs .blob_objects ) {
700685 show_commit (list -> item );
701686 return 0 ;
702687 }
703- if (limited )
688+ if (revs . limited )
704689 list = limit_list (list );
705690 if (revs .topo_order )
706691 sort_in_topological_order (& list , revs .lifo );
0 commit comments