summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7e21c29)
raw | patch | inline | side by side (parent: 7e21c29)
author | Linus Torvalds <torvalds@g5.osdl.org> | |
Wed, 6 Jul 2005 16:56:16 +0000 (09:56 -0700) | ||
committer | Linus Torvalds <torvalds@g5.osdl.org> | |
Wed, 6 Jul 2005 16:56:16 +0000 (09:56 -0700) |
..and move the DUPCHECK to rev-list.c since both the merge-order and the
upcoming topo-sort get confused by dups.
upcoming topo-sort get confused by dups.
epoch.c | patch | blob | history | |
epoch.h | patch | blob | history | |
rev-list.c | patch | blob | history |
index abfd594bb9c9cb0abc427dd35c29a0a6bc929978..7888f1da4ed6023a9c46cb7ce98c78ba606ca0f5 100644 (file)
--- a/epoch.c
+++ b/epoch.c
int action = CONTINUE;
struct commit_list *reversed = NULL;
- for (; list; list = list->next) {
- struct commit *next = list->item;
-
- if (!(next->object.flags & DUPCHECK)) {
- next->object.flags |= DUPCHECK;
- commit_list_insert(list->item, &reversed);
- }
- }
+ for (; list; list = list->next)
+ commit_list_insert(list->item, &reversed);
if (!reversed)
return ret;
index 0c1385a5d4025a8ad970fbf7eeb69ee0ae771011..7493d5a241212203e4f7527958128f25c5093ca0 100644 (file)
--- a/epoch.h
+++ b/epoch.h
int sort_list_in_merge_order(struct commit_list *list, emitter_func emitter);
-#define UNINTERESTING (1u<<2)
-#define BOUNDARY (1u<<3)
-#define VISITED (1u<<4)
-#define DISCONTINUITY (1u<<5)
-#define DUPCHECK (1u<<6)
-#define LAST_EPOCH_FLAG (1u<<6)
+/* Low bits are used by rev-list */
+#define UNINTERESTING (1u<<10)
+#define BOUNDARY (1u<<11)
+#define VISITED (1u<<12)
+#define DISCONTINUITY (1u<<13)
+#define LAST_EPOCH_FLAG (1u<<14)
#endif /* EPOCH_H */
diff --git a/rev-list.c b/rev-list.c
index c20fec804e1fd4f88ee03647d5e86bb1e6e06e0c..e4d167c003ac48bda30713accf51c88cb08caae2 100644 (file)
--- a/rev-list.c
+++ b/rev-list.c
#define SEEN (1u << 0)
#define INTERESTING (1u << 1)
#define COUNTED (1u << 2)
-#define SHOWN (LAST_EPOCH_FLAG << 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"
commit = get_commit_reference(arg, flags);
if (!commit)
continue;
+ if (commit->object.flags & DUPCHECK)
+ continue;
+ commit->object.flags |= DUPCHECK;
insert(commit, &list);
}