summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 86ab490)
raw | patch | inline | side by side (parent: 86ab490)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 6 Mar 2007 00:10:28 +0000 (16:10 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 6 Mar 2007 09:08:34 +0000 (01:08 -0800) |
This removes the flag internally used by revision traversal to
decide which commits are indeed boundaries and renames it to
CHILD_SHOWN. builtin-bundle uses the symbol for its
verification, but I think the logic it uses it is wrong. The
flag is still useful but it is local to the git-bundle, so it is
renamed to PREREQ_MARK.
Signed-off-by: Junio C Hamano <junkio@cox.net>
decide which commits are indeed boundaries and renames it to
CHILD_SHOWN. builtin-bundle uses the symbol for its
verification, but I think the logic it uses it is wrong. The
flag is still useful but it is local to the git-bundle, so it is
renamed to PREREQ_MARK.
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-bundle.c | patch | blob | history | |
revision.c | patch | blob | history | |
revision.h | patch | blob | history |
diff --git a/builtin-bundle.c b/builtin-bundle.c
index 279b8f8e582665dda3c99d800094db2f5cf5af99..76bd204de89172ca8fadc716b4d7daecae3ef4a7 100644 (file)
--- a/builtin-bundle.c
+++ b/builtin-bundle.c
return pid;
}
+#define PREREQ_MARK (1u<<16)
+
static int verify_bundle(struct bundle_header *header)
{
/*
struct ref_list_entry *e = p->list + i;
struct object *o = parse_object(e->sha1);
if (o) {
- o->flags |= BOUNDARY_SHOW;
+ o->flags |= PREREQ_MARK;
add_pending_object(&revs, o, e->name);
continue;
}
i = req_nr;
while (i && (commit = get_revision(&revs)))
- if (commit->object.flags & BOUNDARY_SHOW)
+ if (commit->object.flags & PREREQ_MARK)
i--;
for (i = 0; i < req_nr; i++)
diff --git a/revision.c b/revision.c
index 5d137ea14a6f73f2d2c487e1c8fe65b396b32cc4..2d27ccf70b046b1928aa725d531ff354f0674f0a 100644 (file)
--- a/revision.c
+++ b/revision.c
commit_list_insert(c, &l);
revs->commits = l;
revs->reverse = 0;
+ c = NULL;
}
/*
* Now pick up what they want to give us
*/
- c = get_revision_1(revs);
+ if (!(c = get_revision_1(revs)))
+ return NULL;
while (0 < revs->skip_count) {
revs->skip_count--;
c = get_revision_1(revs);
if (!c)
break;
+ /* Although we grabbed it, it is not shown. */
+ c->object.flags &= ~SHOWN;
}
/*
case -1:
break;
case 0:
+ /* Although we grabbed it, it is not shown. */
+ if (c)
+ c->object.flags &= ~SHOWN;
c = NULL;
break;
default:
diff --git a/revision.h b/revision.h
index 6579a446ea8bfc7a3e8b0f19a39013458c6b537b..1885f8d233f5b30eb8d184192d51eaffb6e3320b 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 BOUNDARY_SHOW (1u<<6)
+#define CHILD_SHOWN (1u<<6)
#define ADDED (1u<<7) /* Parents already parsed and added? */
#define SYMMETRIC_LEFT (1u<<8)
-#define CHILD_SHOWN (1u<<9)
struct rev_info;
struct log_info;