summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eff19d5)
raw | patch | inline | side by side (parent: eff19d5)
author | Jon Seymour <jon.seymour@gmail.com> | |
Mon, 20 Jun 2005 02:29:38 +0000 (12:29 +1000) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Mon, 20 Jun 2005 03:13:18 +0000 (20:13 -0700) |
If b is reachable from a, then:
git-rev-list a b
argument would print one of the commits twice.
This patch fixes that problem. A previous problem fixed it for the
--merge-order switch.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
git-rev-list a b
argument would print one of the commits twice.
This patch fixes that problem. A previous problem fixed it for the
--merge-order switch.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
epoch.h | patch | blob | history | |
rev-list.c | patch | blob | history |
index 585110bdd62b69b61b2ac55fb2c7401a986346a5..0c1385a5d4025a8ad970fbf7eeb69ee0ae771011 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 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)
-#endif /* EPOCH_H */
+#endif /* EPOCH_H */
diff --git a/rev-list.c b/rev-list.c
index 6e6a6dfecd72c4380f7248ff61fc607ffc1dbfc2..897a0e7ad84b8e42e498770717d9ca05cca19e63 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)
static const char rev_list_usage[] =
"usage: git-rev-list [OPTION] commit-id <commit-id>\n"
static void show_commit(struct commit *commit)
{
+ commit->object.flags |= SHOWN;
if (show_breaks) {
prefix = "| ";
if (commit->object.flags & DISCONTINUITY) {
static int filter_commit(struct commit * commit)
{
- if (commit->object.flags & UNINTERESTING)
+ if (commit->object.flags & (UNINTERESTING|SHOWN))
return CONTINUE;
if (min_age != -1 && (commit->date > min_age))
return CONTINUE;
return STOP;
if (max_count != -1 && !max_count--)
return STOP;
-
return DO;
}