git-rev-list: remove the DUPCHECK logic, use SEEN instead
authorLinus Torvalds <torvalds@g5.osdl.org>
Wed, 6 Jul 2005 23:52:49 +0000 (16:52 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 6 Jul 2005 23:52:49 +0000 (16:52 -0700)
That's what we should have done in the first place, since it not only
avoids another unnecessary flag, it also protects the commits from
showing up as duplicates later when they show up as parents of another
commit (in the pop_most_recent_commit() path).

This will hopefully also fix --topo-sort.

rev-list.c

index fb33724..0dd4512 100644 (file)
@@ -9,7 +9,6 @@
 #define INTERESTING    (1u << 1)
 #define COUNTED                (1u << 2)
 #define SHOWN          (1u << 3)
-#define DUPCHECK       (1u << 4)
 
 static const char rev_list_usage[] =
        "usage: git-rev-list [OPTION] commit-id <commit-id>\n"
@@ -488,9 +487,9 @@ int main(int argc, char **argv)
                commit = get_commit_reference(arg, flags);
                if (!commit)
                        continue;
-               if (commit->object.flags & DUPCHECK)
+               if (commit->object.flags & SEEN)
                        continue;
-               commit->object.flags |= DUPCHECK;
+               commit->object.flags |= SEEN;
                insert(commit, &list);
        }