summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e6bfaf3)
raw | patch | inline | side by side (parent: e6bfaf3)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 17 Apr 2006 01:12:49 +0000 (18:12 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 17 Apr 2006 05:05:38 +0000 (22:05 -0700) |
The boundary commits are shown for UI like gitk to draw them as
soon as topo-order sorting allows, and should not be omitted by
get_revision() filtering logic. As long as their immediate
child commits are shown, we should not filter them out.
Signed-off-by: Junio C Hamano <junkio@cox.net>
soon as topo-order sorting allows, and should not be omitted by
get_revision() filtering logic. As long as their immediate
child commits are shown, we should not filter them out.
Signed-off-by: Junio C Hamano <junkio@cox.net>
http-push.c | patch | blob | history | |
rev-list.c | patch | blob | history | |
revision.c | patch | blob | history | |
revision.h | patch | blob | history |
diff --git a/http-push.c b/http-push.c
index 19a0f772e7bf729755c66ab38f5dfb64ae784f00..114d01bced1cb3f9a906c7c0df85bf5cd2b811e0 100644 (file)
--- a/http-push.c
+++ b/http-push.c
#define LOCK_TIME 600
#define LOCK_REFRESH 30
-/* bits #0-6 in revision.h */
+/* bits #0-15 in revision.h */
-#define LOCAL (1u << 7)
-#define REMOTE (1u << 8)
-#define FETCHING (1u << 9)
-#define PUSHING (1u << 10)
+#define LOCAL (1u<<16)
+#define REMOTE (1u<<17)
+#define FETCHING (1u<<18)
+#define PUSHING (1u<<19)
/* We allow "recursive" symbolic refs. Only within reason, though */
#define MAXDEPTH 5
diff --git a/rev-list.c b/rev-list.c
index 963707a495092405c3eb5b155c195b2968afdac7..f5511e72db103ea2b549b48e84985969a94c5485 100644 (file)
--- a/rev-list.c
+++ b/rev-list.c
#include "diff.h"
#include "revision.h"
-/* bits #0-6 in revision.h */
+/* bits #0-15 in revision.h */
-#define COUNTED (1u<<7)
+#define COUNTED (1u<<16)
static const char rev_list_usage[] =
"git-rev-list [OPTION] <commit-id>... [ -- paths... ]\n"
diff --git a/revision.c b/revision.c
index 0505f3f455151ac2fafc7fe2df2e6fd147d20f08..e1f9816bd7e2f91b3c23dedd50f0a03d33c33dfc 100644 (file)
--- a/revision.c
+++ b/revision.c
}
}
+static void mark_boundary_to_show(struct commit *commit)
+{
+ struct commit_list *p = commit->parents;
+ while (p) {
+ commit = p->item;
+ p = p->next;
+ if (commit->object.flags & BOUNDARY)
+ commit->object.flags |= BOUNDARY_SHOW;
+ }
+}
+
struct commit *get_revision(struct rev_info *revs)
{
struct commit_list *list = revs->commits;
}
if (commit->object.flags & SHOWN)
continue;
- if (!(commit->object.flags & BOUNDARY) &&
- (commit->object.flags & UNINTERESTING))
+
+ /* We want to show boundary commits only when their
+ * children are shown. When path-limiter is in effect,
+ * rewrite_parents() drops some commits from getting shown,
+ * and there is no point showing boundary parents that
+ * are not shown. After rewrite_parents() rewrites the
+ * parents of a commit that is shown, we mark the boundary
+ * parents with BOUNDARY_SHOW.
+ */
+ if (commit->object.flags & BOUNDARY_SHOW) {
+ commit->object.flags |= SHOWN;
+ return commit;
+ }
+ if (commit->object.flags & UNINTERESTING)
continue;
if (revs->min_age != -1 && (commit->date > revs->min_age))
continue;
if (revs->parents)
rewrite_parents(revs, commit);
}
+ if (revs->boundary)
+ mark_boundary_to_show(commit);
commit->object.flags |= SHOWN;
return commit;
} while (revs->commits);
diff --git a/revision.h b/revision.h
index 8970b57e3c7e2ca8d213258f1befb84ac06e3a13..4b270435109a8aefb4a85fa01d1f5d8a0f33f0bb 100644 (file)
--- a/revision.h
+++ b/revision.h
#define SHOWN (1u<<3)
#define TMP_MARK (1u<<4) /* for isolated cases; clean after use */
#define BOUNDARY (1u<<5)
-#define ADDED (1u<<6) /* Parents already parsed and added? */
+#define BOUNDARY_SHOW (1u<<6)
+#define ADDED (1u<<7) /* Parents already parsed and added? */
struct rev_info;